A pod is not running. Walk me through debugging Pending, ImagePullBackOff, and CrashLoopBackOff.
What they are really testing: Whether you have a systematic kubectl debugging routine and can map each status to its likely causes. This is daily Kubernetes work.
A real interview question
A pod is not running. Walk me through debugging Pending, ImagePullBackOff, and CrashLoopBackOff.
What most people say
drag me
“I would delete the pod and let Kubernetes recreate it.”
Recreating a deterministically failing pod just reproduces the failure. Pending, ImagePullBackOff, and CrashLoopBackOff each have specific causes that describe and logs reveal; deleting skips the diagnosis entirely.
The follow-ups they ask next
CrashLoopBackOff but the current logs are empty. How do you see what happened?
kubectl logs --previous to read the last terminated container, and kubectl describe for the exit code and reason (for example OOMKilled). The container may die too fast to log on the current attempt.
A pod is Pending with no obvious resource issue. What else?
An unbound PVC (no matching PV/StorageClass), an untolerated taint, a nodeSelector/affinity nothing matches, or no node in the required zone. kubectl describe pod shows the scheduler message.
What the interviewer is listening for
- Leads with describe + events
- Maps each status to specific causes
- Knows logs --previous and exit codes
What sinks the answer
- Just deletes/recreates the pod
- Cannot distinguish the statuses
- Never reads events or previous logs
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.
“Start with [kubectl describe pod + events, which usually name the reason]. [Pending = cannot schedule: resources, selectors/affinity, taints, or an unbound PVC]. [ImagePullBackOff = bad image/tag, unreachable registry, or missing pull secrets]. [CrashLoopBackOff = read logs incl. --previous, check exit code, look for bad config/migration/OOMKill]. Diagnose, [do not just recreate].”
Keep going with kubernetes
Foundation
What problem does Kubernetes solve, and what does it actually do for you?
Foundation
What are the main components of a Kubernetes cluster (control plane and nodes)?
Foundation
What is a Pod, and why do you use a Deployment instead of creating Pods directly?
Foundation
What is a Service in Kubernetes, and what are the main types?
Junior
When would you use a Deployment versus a StatefulSet versus a DaemonSet?
Junior
How do you inject configuration and secrets into a pod, and what is the catch with Kubernetes Secrets?
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