Skip to content

Instantly share code, notes, and snippets.

@filipedfs
Last active June 30, 2022 18:32
Show Gist options
  • Select an option

  • Save filipedfs/25952c76cf1179cb87afe90049d33413 to your computer and use it in GitHub Desktop.

Select an option

Save filipedfs/25952c76cf1179cb87afe90049d33413 to your computer and use it in GitHub Desktop.
Kubernetes commands
# List nodes
kubectl get nodes
# List pods
kubectl get pods
# List services
kubectl get services
# Apply a monifest file
kubectl apply -f k8s/deployment.yaml
# Forward a service port
kubectl port-forward service/<service name> <port>:<port>
# View kubernetes configuration on machine
kubectl config view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment