๐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 9243078181 for a free demo.