Your deployment is up, but one pod keeps restarting. The status says CrashLoopBackOff . What now?
Start with one important distinction: CrashLoopBackOff is a retry delay, not the root cause. The container has repeatedly failed, and Kubernetes is waiting before trying again. Your job is to find out why it exited.
This playbook walks through the evidence in a useful order, with a small lab you can reproduce locally.
The five commands I start with
Replace the namespace, pod and container names with yours:
kubectl get pods -n demo kubectl describe pod < pod-name > -n demo kubectl logs < pod-name > -n demo -c < container-name > --previous kubectl logs < pod-name > -n demo -c < container-name > kubectl get events -n demo --sort-by=.lastTimestamp
Enter fullscreen mode
Exit fullscreen mode
For a single-container pod, you can omit -c <container-name> . If the container has never restarted, previous logs may not exist.…