A kubectl cheatsheet gives you instant access to the most common Kubernetes CLI commands for managing clusters, pods, deployments, and services. Whether you're debugging a failing pod or rolling out a new deployment, this reference covers the full kubectl command set with flags and practical examples.
How to Use This Kubernetes Commands Cheatsheet
This kubectl cheatsheet organizes all essential Kubernetes commands by task area. Use the search box to instantly filter by keyword — type "pod", "logs", "apply", or any command fragment to narrow results.
Step 1: Find Your Command
Type keywords in the search box to filter all 60+ commands simultaneously. Or browse by section — click any section header to expand or collapse that group. Each command shows the full syntax, common flags, and a practical example.
Step 2: Copy the Command
Click the copy icon next to any command to copy it directly to your clipboard. Commands are copied exactly as shown so you can paste into your terminal. Replace placeholders like [pod-name] with your actual resource names.
Resource Shorthand Aliases
Kubernetes supports abbreviations to save typing. Instead of kubectl get pods you can type kubectl get po. Common aliases: po = pods, deploy = deployments, svc = services, ns = namespaces, cm = configmaps, no = nodes, ing = ingress, pv = persistentvolumes, pvc = persistentvolumeclaims.
Common Debugging Workflow
When a pod isn't working: (1) kubectl get pods to see status, (2) kubectl describe pod [name] to see events and error details, (3) kubectl logs [name] to see application output. For crashlooping containers, add --previous to the logs command to see output from the crashed instance.
Frequently Asked Questions
Is this kubectl cheatsheet free?
Yes, completely free with no signup. All commands are copyable with a single click.
Is my data safe when using this tool?
Yes. This cheatsheet runs entirely in your browser. No data is sent to any server.
What are the most important kubectl commands to know?
The essential kubectl commands are: kubectl get pods (list pods), kubectl describe pod [name] (debug details), kubectl logs [pod] (view logs), kubectl apply -f [file] (apply config), kubectl exec -it [pod] -- bash (shell into pod), and kubectl port-forward [pod] [local:remote] (port forwarding).
What are kubectl shorthand aliases?
Kubernetes supports resource type abbreviations: po = pods, deploy = deployments, svc = services, ns = namespaces, cm = configmaps, ing = ingress, pv = persistentvolumes, pvc = persistentvolumeclaims, sa = serviceaccounts, no = nodes.
How do I switch between Kubernetes clusters?
Use kubectl config get-contexts to list all configured contexts, kubectl config use-context [name] to switch to a context, and kubectl config current-context to see which context is active. Each context maps to a cluster, user, and namespace.
How do I see why a pod is failing?
Run kubectl describe pod [pod-name] to see events and conditions, kubectl logs [pod-name] for application output, and kubectl logs [pod-name] --previous for logs from a crashed container. For init container issues, use kubectl logs [pod-name] -c [init-container-name].