Kubernetes CrashLoopBackOff Triage
Step-by-step triage for containers stuck in exponential restart backoff (10s to 5m).
Root Cause
CrashLoopBackOff is not the root error; it means the container keeps exiting non-zero and kubelet is delaying the next restart (10s, 20s, 40s, 80s, 160s, capped at 5m).
How to Fix
- Read the previous container instance logs immediately with --previous before the next crash rotates them.
- Check Exit Code in Last State: 137 = OOMKilled, 139 = SIGSEGV, 127 = command not found, 126 = permission denied, 1 = app exception or bad config.
- Verify readinessProbe / livenessProbe paths and ports; a failing livenessProbe forces kubelet to kill healthy slow-starting containers.
Diagnostic Commands
kubectl logs <pod> -n <ns> --previous --tail=150 kubectl describe pod <pod> -n <ns>