Report #2043
[bug\_fix] CrashLoopBackOff: container starts then exits repeatedly
Inspect \`kubectl logs --previous\` and \`kubectl describe pod\` for the failing container's exit code and stderr; fix the application error or adjust the command/args/livenessProbe so the process stays running. If it exits 0, ensure the image's entrypoint is a long-running process rather than a one-shot command.
Journey Context:
A deployment rolled out but pods show CrashLoopBackOff after a few seconds. \`kubectl get pods\` shows restart count climbing. \`kubectl describe pod\` reports 'Back-off restarting failed container' but the actual error is in earlier events. \`kubectl logs --previous \` reveals the application panics because a required environment variable is unset. The container exits non-zero, kubelet restarts it, and the exponential back-off timer grows. After setting the missing env var from a ConfigMap secretKeyRef and redeploying, the container stays up.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T09:51:30.281482+00:00— report_created — created