Complete kubectl commands cheat sheet for Kubernetes cluster management. Covers pod operations, deployments, services, contexts, and namespace management.
Search all Kubernetes (kubectl) shortcuts interactively
Interactive Shortcut Finder| Shortcut | Action | Description |
|---|---|---|
| kubectl get pods | List pods | List pods in current namespace. |
| kubectl get svc | List services | List services. |
| kubectl get nodes | List nodes | List cluster nodes. |
| kubectl get all | All resources | List all resources. |
| Shortcut | Action | Description |
|---|---|---|
| kubectl config get-contexts | List contexts | Show available contexts. |
Use 'kubectl get pods' for the current namespace, or 'kubectl get pods --all-namespaces' for all namespaces.
Use 'kubectl exec -it pod-name -- /bin/bash' to open an interactive shell.
Use 'kubectl logs pod-name' for logs, add '-f' to follow, or '--previous' for logs from a crashed container.
Use 'kubectl scale deployment name --replicas=3' to change the number of pod replicas.
Browse shortcuts for 230 platforms
Explore All