A pod is in CrashLoopBackOff after a deploy. Walk me through your debugging, command by command.
What they are really testing: The single most common Kubernetes interview scenario. They want an ordered method that distinguishes the container failing to start from the container starting and then exiting.
A real interview question
A pod is in CrashLoopBackOff after a deploy. Walk me through your debugging, command by command.
What most people say
drag me
“I would restart the pod and see if it comes back.”
CrashLoopBackOff already is Kubernetes restarting it repeatedly, so a manual restart adds nothing. It signals the candidate does not know what the state name means, which is the whole question.
The follow-ups they ask next
Logs are empty and events show nothing unusual. Now what?
Suspect the entrypoint or a failing startup probe. Override the command with a sleep so the container stays up, then exec in and run the real command by hand to see the failure directly.
Exit code 137 with the app under its limit. What else?
The limit may be too low for a spike, or a sidecar is consuming the shared budget, or the JVM or runtime heap is not aware of the cgroup limit and sizes itself off host memory.
What the interviewer is listening for
- Knows --previous for a dead container
- Reads exit codes meaningfully
- Rolls back while investigating
What sinks the answer
- Suggests restarting the pod
- Does not check events
- Debugs in production with users affected
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“CrashLoop means [it is already restarting, so another restart proves nothing]. I check [logs --previous for the dead container], then [describe for events like image pull, missing secret, OOM], then [the exit code: 137 is a kill, 1 is the app]. Meanwhile [roll back to the last good revision].”
Keep going with troubleshooting
Junior
A developer says the build passes locally but fails in CI. How do you debug that?
Junior
A production server is failing writes. Disk is 100% full. Walk me through what you do.
Junior
At midnight everything started failing with TLS errors. What happened and what do you do?
Mid
The deploy reports success, pods are Running, but users get 502s. Where do you look?
Mid
A Kubernetes node goes NotReady and pods are stuck Terminating. What is happening and what do you do?
Mid
You get paged: the site is down. You have no other information. What are your first five minutes?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free