kubectl get pods -A --field-selector=status.phase=PendingKubernetes Pod Debugging Cheat Sheet
Troubleshoot Pending, CrashLoopBackOff, image pull, readiness, liveness, and init container problems.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
Pending and Unschedulable Pods
bashANYpendingscheduling
bash
bashANYpendingdescribe
bash
kubectl describe pod <pod> -n <namespace>bashANYstoragepvc
bash
kubectl get pvc -AbashANYstoragepvc
bash
kubectl describe pvc <claim> -n <namespace>bashANYschedulingtaints
bash
kubectl describe node <node> | sed -n '/Taints:/,/Unschedulable:/p'bashANYschedulingaffinity
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.nodeSelector}{"
"}{.spec.affinity}{"
"}'CrashLoopBackOff and Image Pull Errors
bashANYcrashlooppods
bash
kubectl get pods -A | grep CrashLoopBackOffbashANYcrashlooplogs
bash
kubectl logs <pod> -n <namespace> -c <container> --previousbashANYimage-pullevents
bash
kubectl describe pod <pod> -n <namespace> | sed -n '/Events:/,$p'bashANYimage-pullsecrets
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.imagePullSecrets[*].name}{"
"}'bashANYimage-pullsecrets
bash
kubectl describe secret <secret> -n <namespace>bashANYstatusreason
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.containerStatuses[0].state.waiting.reason}{"
"}'Readiness, Liveness, and Startup Probes
bashANYprobeshealthchecks
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.containers[*].readinessProbe}{"
"}{.spec.containers[*].livenessProbe}{"
"}{.spec.containers[*].startupProbe}{"
"}'bashANYprobesevents
bash
kubectl describe pod <pod> -n <namespace> | grep -A5 -i probebashANYprobesexec
bash
kubectl exec -it <pod> -n <namespace> -c <container> -- <probe-command>bashANYprobeshttp
bash
kubectl port-forward pod/<pod> -n <namespace> 8080:<container-port>bashANYprobescurl
bash
curl -i http://127.0.0.1:8080/healthzInit Container Debugging
bashANYinit-containersstatus
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.initContainerStatuses}{"
"}'bashANYinit-containerslogs
bash
kubectl logs <pod> -n <namespace> -c <init-container>bashANYinit-containersevents
bash
kubectl describe pod <pod> -n <namespace>Copy a pod and override its command
Use kubectl debug to clone a pod with a safer command for inspection.
bashANYdebugcopy-pod
bash
kubectl debug <pod> -n <namespace> --copy-to=<pod>-copy --set-image='*=busybox:1.36' -itResources and OOMKilled
bashANYresourcesmetrics
bash
kubectl top pod <pod> -n <namespace>bashANYresourceslimits
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.containers[*].resources}{"
"}'bashANYoomkilledstatus
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.containerStatuses[0].lastState.terminated.reason}{"
"}'bashANYexit-codestatus
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.containerStatuses[0].lastState.terminated.exitCode}{"
"}'More in Kubernetes Debugging
Kubernetes Logs and Events Cheat Sheet
Find pod logs, previous container logs, event timelines, kube-system logs, and cluster incident evidence quickly.
Kubernetes Node Debugging Cheat Sheet
Diagnose node readiness, kubelet issues, pressure conditions, cordon/drain, and node-level debugging with kubectl debug.
Kubernetes Network Debugging Cheat Sheet
Debug Services, DNS, Ingress, network policies, connectivity, endpoints, and port-forwarding issues.
Kubernetes Debugging Cheat Sheet
Core kubectl troubleshooting commands for pods, deployments, services, events, logs, exec sessions, and ephemeral debugging.