Complete kubectl commands cheat sheet for Kubernetes cluster management. Covers pod operations, deployments, services, contexts, and namespace management.
Kubernetes (kubectl) is a popular DevOps/CLI tool used by professionals worldwide. Learning keyboard shortcuts can dramatically speed up your workflow — studies show shortcut users save an average of 8 days per year compared to mouse-only users.
This page covers all 17 Kubernetes (kubectl) shortcuts across 3 categories: View Resources, Manage Resources, Context & Namespace. Each shortcut includes a description to help you understand when and how to use it effectively.
Start with the essentials: Learn kubectl get pods (List pods) and kubectl get svc (List services) first — these are the most commonly used.
Practice daily: Pick 2–3 new shortcuts each day and consciously use them instead of the mouse. Within a week, they become muscle memory.
Print this cheat sheet: Keep a reference nearby until shortcuts become automatic. Focus on the View Resources category first.
CLI tip: Create shell aliases for the commands you use most. Combine them with these shortcuts for maximum efficiency.
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 248 platforms
Explore All