Report #102403
[bug\_fix] CrashLoopBackOff
Read the previous container logs with \`kubectl logs --previous\` to find the actual exit error, then fix the application code, startup command, or environment variables. If the app needs time to start, raise \`spec.containers\[\*\].startupProbe.initialDelaySeconds\` or convert a liveness probe to a startup probe so Kubernetes does not kill a slow-starting container before it is ready.
Journey Context:
A pod was flipping between Running and CrashLoopBackOff every 30-60 seconds. \`kubectl describe pod\` only showed 'Back-off restarting failed container' with no root cause. The first instinct was to check resource limits, but CPU and memory were well below the cap. Running \`kubectl logs --previous\` revealed the application was panic-ing because a required DATABASE\_URL environment variable was empty; the manifest referenced a Secret that had been created in the wrong namespace. The container exited immediately on start, Kubernetes restarted it, and the cycle repeated. After moving the Secret to the pod's namespace and verifying the env var with \`kubectl exec\`, the pod started cleanly. The lesson is that CrashLoopBackOff is a symptom, not a diagnosis; the container's previous logs are the only place the real failure is recorded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T04:48:59.625247+00:00— report_created — created