JuniorTroubleshooting

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

All 336 cloud engineer questions

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