You push a new version of a service and within two minutes the pods are all showing CrashLoopBackOff. The team is watching you share your screen. Walk me through exactly what you do.
What they are really testing: They want to see whether you treat CrashLoopBackOff as a symptom with a method behind it, or as a scary word you google. They are also listening for whether you protect users before you satisfy your curiosity.
A real interview question
You push a new version of a service and within two minutes the pods are all showing CrashLoopBackOff. The team is watching you share your screen. Walk me through exactly what you do.
What most people say
drag me
“I would restart the pod and see if it comes back healthy. If it keeps crashing I would delete the deployment and redeploy it.”
Restarting is what Kubernetes is already doing for you on a loop, so the answer shows the candidate does not know what the state actually means, and deleting the deployment destroys the evidence and the service at the same time.
The follow-ups they ask next
The logs are completely empty. Now what?
Empty logs means it died before the app printed anything. Look at describe for image entrypoint errors, a failing init container, a mounted secret that does not exist, or a readonly filesystem. kubectl get events sorted by timestamp is your friend.
How would you stop this reaching production next time?
Talk about readiness and liveness probes, a canary or a rolling update with maxUnavailable set low, and running the exact image in a staging namespace with the production config shape.
The restart count is 400 and the backoff is now 5 minutes. Does that change anything?
Say that the exponential backoff caps around 5 minutes, so the pod is effectively dead. It also means this has been broken for a while, so check whether an alert should have fired and did not.
What the interviewer is listening for
- Defines CrashLoopBackOff as backoff between restarts, not as a crash type
- Rolls back to protect users before hunting the root cause
- Knows kubectl logs --previous exists and says why it matters
- Reads exit codes 1, 137 and 143 and maps them to real causes
What sinks the answer
- Suggests deleting the deployment or the namespace to make it go away
- Spends ten minutes on root cause while the service is down
- Only reads the current container logs and concludes there is nothing there
- Cannot say what CrashLoopBackOff literally means
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.
“I have not debugged this exact service, but here is the method I would use. First I would say what the state actually means, then I would get the last good version back in front of users, and only then would I read the exit code and the previous container logs to find out why it died.”
Keep going with troubleshooting
Junior
You get paged at 2am. Checkout latency has gone from 200ms to 4 seconds and it started right after the 11pm deploy. Walk me through what you do.
Junior
It is 3am and you get paged: the primary application server is at 100% disk usage and the app is throwing write errors. You are the only one online. Walk me through exactly what you do.
Junior
A developer pings you: the checkout service cannot reach the payments service, the calls just hang and time out. You have never worked on either service. Walk me through what you do.
Junior
A developer messages you: 'My app suddenly gets Access Denied writing to the S3 bucket. Nothing changed.' It worked yesterday. Walk me through what you do.
Mid
Your load balancer shows 5xx errors jumping from 0.1 percent to 12 percent of requests over ten minutes. There was no deploy. What do you do?
Mid
One of your containers keeps getting OOM killed. It restarts, serves traffic for about twenty minutes, then dies again. Talk me through how you handle it.
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