Case
Kubernetes: CrashLoopBackOff
A pod keeps restarting. Logs and describe output are used to identify the failure and apply the fix.
Case Summary
- ProblemAfter deployment, the pod repeatedly restarts and never becomes Ready.
- SolutionUse logs and describe output to find the failing configuration/command, fix config or image entrypoint, then redeploy.
- Toolskubectl logs/describe/events · ConfigMaps/Secrets · probes
- OutcomePod becomes stable, Ready endpoints appear, traffic works again.
Commands used (examples)
kubectl get pods -n <ns>kubectl describe pod <pod> -n <ns>kubectl logs <pod> -n <ns> --previouskubectl get events -n <ns> --sort-by=.lastTimestamp | tailsystemctl status <service> --no-pagerjournalctl -u <service> -n 200 --no-pager