KubernetesAdvancedHigh severity
Kubernetes CrashLoopBackOff
A container repeatedly starts, exits, and is restarted with increasing delay.
15-45 min Popularity 87/100 Verified 2026-07-21
What does this error mean?
Kubernetes can start the pod, but a container exits repeatedly. The backoff is the delay Kubernetes applies before trying again.
Why does this happen?
- The application crashes during startup.
- Required environment variables or secrets are missing.
- The command or entrypoint is incorrect.
- A liveness probe kills the container.
- The process runs out of memory.
- A required dependency is unavailable.
AI explanation
Plain-English analysis
CrashLoopBackOff describes the restart behavior, not the root cause. The useful evidence is in the previous container logs, pod events, exit code, and probe status.
Quick fix
Terminal
kubectl describe pod <pod>
kubectl logs <pod> --previous
kubectl get pod <pod> -o jsonpath='{.status.containerStatuses[*].lastState.terminated.exitCode}'Expected output: The previous logs or termination state reveals the actual application failure.
Step-by-step fix
1Read the previous container logsThe current container may have no useful logs after a restart. `--previous` retrieves the crashed instance.92%
2Inspect events and probe failuresDescribe the pod to identify mount, scheduling, image, and health-check problems.73%
3Check exit code and resource limitsExit code 137 commonly indicates an out-of-memory kill.48%
Alternative solutions
Deployment
kubectl rollout history deployment/<name> kubectl rollout undo deployment/<name>
Rollback if the crash began with the latest release.
Debug container
kubectl debug -it <pod> --image=busybox
Use an ephemeral container when the application image exits too quickly to inspect.
Real example
Broken
yaml
status:
state:
waiting:
reason: CrashLoopBackOffCorrected
yaml
$ kubectl logs api-7d8f --previous Error: DATABASE_URL is required # Add the missing secret and restart the rollout.
Frequently asked questions
Usually no. Kubernetes is reporting that the container process keeps exiting. The previous logs and exit code reveal why.