πA Method Before the Commands
Most Kubernetes problems are solved by the same three commands, in this order:
kubectl get pods -o wide what state is it in, and on which node?kubectl describe pod read the Events at the bottomkubectl logs --previous what did the container say before it died?Add kubectl get events --sort-by=.lastTimestamp for a cluster-wide timeline. This is exactly how we teach troubleshooting in our Kubernetes course: break it, then fix it.
πCrashLoopBackOff
Meaning: the container starts, exits, and Kubernetes keeps restarting it with increasing back-off delays.
Diagnose:
kubectl logs <pod> --previouskubectl describe pod <pod>Common causes and fixes:
initialDelaySeconds.πPending
Meaning: the scheduler cannot place the pod on any node.
Diagnose: kubectl describe pod and read the FailedScheduling event.
Common causes and fixes:
kubectl get pvc.πImagePullBackOff / ErrImagePull
Meaning: the kubelet cannot pull the image.
Common causes and fixes:
imagePullSecrets.πOOMKilled
Meaning: the container exceeded its memory limit and the kernel killed it (exit code 137).
Diagnose:
kubectl describe pod <pod> # Last State: Terminated, Reason: OOMKilledkubectl top pod <pod>Fixes: raise the memory limit to match real usage, fix the leak, or tune the runtime, for example, make sure the JVM respects container limits with -XX:MaxRAMPercentage.
πCreateContainerConfigError
Meaning: the pod references a ConfigMap, Secret or key that does not exist. Check the names in the pod spec and the namespace, Secrets are namespace-scoped.
πService Not Reachable
Diagnose:
kubectl get endpoints <service>kubectl get pods --show-labelsCommon causes:
Test from inside the cluster:
kubectl run tmp --rm -it --image=busybox -- wget -qO- http://<service>.<namespace>:80πNode NotReady
Check kubectl describe node for conditions such as MemoryPressure, DiskPressure and PIDPressure, then the kubelet and container runtime logs on the node. A full disk from images and logs is a very common cause.
πEvicted Pods
Pods are evicted when a node runs low on memory or disk. Set realistic requests, keep critical workloads in the Guaranteed QoS class, and clean up with kubectl delete pod --field-selector=status.phase=Failed.
πRollout Stuck
kubectl rollout status deployment/<name>kubectl rollout history deployment/<name>kubectl rollout undo deployment/<name>New pods failing readiness will stall a rolling update, roll back first, then debug the new version.
πTroubleshooting Cheat Sheet
πKeep Learning
Prepare for interviews with our Kubernetes interview questions, and if containers are still new, start with Docker vs Kubernetes. Prakalpana's Kubernetes course runs these break-and-fix labs on real clusters, live online or 1-on-1, with CKA/CKAD preparation. WhatsApp or call +91 9180377502 for a free demo.