Reference

Cheat Sheet

The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.

kubectl

Day-to-day commands for inspecting and steering a Kubernetes cluster.
CommandWhat it doesExample
kubectl get podsList pods in the current namespace.kubectl get pods
kubectl get allList the main resources in a namespace.kubectl get all -n default
kubectl get -o wideShow extra columns like node and IP.kubectl get pods -o wide
kubectl describeShow details and recent events for a resource.kubectl describe pod web-7d9f
kubectl logsPrint (and follow) a pod’s logs.kubectl logs -f web-7d9f
kubectl execOpen a shell inside a pod.kubectl exec -it web-7d9f -- sh
kubectl applyCreate or update resources from a manifest.kubectl apply -f deployment.yaml
kubectl deleteDelete a resource.kubectl delete pod web-7d9f
kubectl scaleChange the number of replicas.kubectl scale deploy/web --replicas=3
kubectl rollout statusWatch a deployment roll out.kubectl rollout status deploy/web
kubectl rollout undoRoll back to the previous version.kubectl rollout undo deploy/web
kubectl port-forwardForward a local port to a service.kubectl port-forward svc/web 8080:80
kubectl topShow CPU/memory usage.kubectl top pods
kubectl get nsList namespaces.kubectl get namespaces
kubectl config use-contextSwitch the cluster you are talking to.kubectl config use-context prod
kubectl editEdit a live resource in your editor.kubectl edit deploy/web