Report #97174
[bug\_fix] CrashLoopBackOff: pod restarts repeatedly and never becomes Ready
Run \`kubectl logs --previous\` \(or \`kubectl logs -p \`\) to capture the logs from the crashed container, then fix the underlying application error \(bad startup command, missing dependency, unhandled exception, missing env var, or liveness probe hitting the app before it is ready\). If logs are empty, check \`kubectl describe pod \` for exit codes and events, and verify the container command/args in the Deployment manifest.
Journey Context:
A deployment rolls out and the pod flaps: Running for 10 seconds, then CrashLoopBackOff, restart count climbing. The first instinct is to tail logs, but \`kubectl logs\` shows nothing because the current container is not running. The \`--previous\` flag reveals the real crash output: a Python ImportError for a module that was removed in the latest image, or a Node app failing because DATABASE\_URL is unset. In another case the app starts fine but the liveness probe path \`/healthz\` returns 404, so kubelet kills it after 30s. The describe output shows \`Liveness probe failed: HTTP probe failed with statuscode: 404\`. The fix is either to add the health endpoint, point the probe at a real endpoint, or increase \`initialDelaySeconds\` so the app has time to initialize. The key insight is that CrashLoopBackOff is a symptom, not a diagnosis; the previous container's logs and the Events section are the actual evidence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:40:32.290342+00:00— report_created — created