How do you debug a pod stuck in CrashLoopBackOff?
Quick Answer
The container starts, crashes, and Kubernetes restarts it with growing back-off. Read the logs (including --previous), describe the pod for the exit reason, and check config, dependencies, and probes.
Detailed Answer
Order of attack: kubectl logs <pod> --previous (the crashed instance), kubectl describe pod (events, last state, exit code), then verify env/secrets/config, missing dependencies, a bad command/entrypoint, or a too-aggressive liveness probe restarting a slow-but-healthy app. Fix the root cause rather than just restarting.
Code Example
kubectl logs <pod> --previous kubectl describe pod <pod>
Interview Tip
List the causes (app error, bad config, missing dep, liveness probe) and that --previous shows the crashed container logs.