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> --previous
kubectl get events -n <ns> --sort-by=.lastTimestamp | tail
systemctl status <service> --no-pager
journalctl -u <service> -n 200 --no-pager