Kubernetes Interview Troubleshooting Drills: Timed Scenarios, kubectl Paths and Spoken Answers
Kubernetes interview troubleshooting drills train the skill interviewers actually score: reading a symptom, naming the layer, running the confirming command, and explaining the branch aloud. This guide gives ten timed drills covering CrashLoopBackOff, ImagePullBackOff, Pending pods, empty Service endpoints, DNS, OOMKilled, Node NotReady, NetworkPolicy, PVC pending, and CPU throttling, each with first commands, root-cause branches, a spoken answer structure, traps that lose marks, and a scoring rubric for honest self-grading.
1. What Kubernetes interview troubleshooting drills actually test
Kubernetes interview troubleshooting drills test diagnostic order under time pressure, not memorised definitions. Interviewers watch whether you read the symptom exactly, name the failing layer, run a confirming command, branch on evidence, protect users without destroying proof, then fix desired state and state a prevention step in plain language.
Illustrative composite: a candidate opens a live interview round and sees three pods restarting, one Service returning connection refused, and a node marked NotReady. The candidate deletes the restarting pod first. The replacement crashes the same way, the previous logs are gone, and the interviewer has learned the wrong lesson about the candidate. Nothing in that opening minute required deep cluster knowledge. It required order.
That is the gap these drills close. A strong candidate treats every status string as a layer marker. Pending points at scheduling or storage binding before any container ran. ImagePullBackOff points at the kubelet image path. CrashLoopBackOff points at a process that started and exited. A Service with no endpoints points at selector, readiness, or port wiring. Each marker tells you which object to read first, and saying that aloud is part of the score.
Interviewers also listen for restraint. Deleting a pod, raising limits, restarting CoreDNS, or adding replicas can all sound active while removing the evidence that separates causes. The drills below keep returning to one habit: read state, read why, name a hypothesis, then act. Speed comes from fewer wrong turns, not from typing faster.
2. How to run Kubernetes interview troubleshooting drills under time pressure
Run Kubernetes interview troubleshooting drills in seven spoken steps: restate the symptom, name the likely layer, run the confirming command, read the branch evidence, mitigate only if users are hurt, fix the desired state, and close with prevention. Give each drill five minutes and score the path, not only the fix.
Use the same opening commands until they become automatic. kubectl get pods -o wide shows status, restarts, age, and node placement. kubectl describe pod exposes conditions, container state, exit code, and Events. kubectl logs --previous reads the run that already died. kubectl get events --sort-by=.lastTimestamp widens the view when one object looks quiet. For deeper command fluency, keep the kubectl master guide open during practice, then close it during timed rounds.
Spoken answer structure that scores well: "The symptom is X, which usually sits in the scheduling, image, process, network, storage, or node layer. I would run Y first because it separates A from B. If I see A, the fix is this field. If I see B, the fix is that object. I would avoid Z until I have read the evidence, because Z hides the cause."
Rehearsal cadence matters as much as the drill list. Run one drill aloud each day with a visible timer, record the answer on your phone, and listen only for order: did the layer come before the command, and did the command come before the fix? Twice a week, run two drills back to back with different layers, such as Pending followed by DNS, so you practise switching objects without carrying the previous hypothesis into the new symptom. Once a week, ask a peer to interrupt with a shortcut suggestion, such as raising limits or restarting a component, and practise declining it with evidence instead of arguing. That interruption is where many interviews are won, because it shows whether your method survives pressure or collapses into the first plausible action someone offers.
Score each attempt out of ten. Two points for naming the layer before touching anything. Two for the confirming command. Two for ordered causes, most common first. Two for the exact fix, naming the field or object. One for mitigation that preserves evidence. One for prevention, such as a probe change, an alert, a quota guardrail, or a rollout check. A correct fix with a chaotic path scores lower than a calm path that reaches the right branch.
3. Drill 1 in Kubernetes interview troubleshooting drills: CrashLoopBackOff
In Kubernetes interview troubleshooting drills, CrashLoopBackOff means the container started, exited, and the kubelet is waiting longer between restarts. Read the exit code and previous logs before changing resources. Exit code 1 points at the application, 137 at SIGKILL, 127 at a missing command, and probe kills need Events proof.
Prompt: after a deploy, one pod restarts every minute and a teammate suggests doubling CPU and memory. Your first move is to refuse the shortcut politely and read the dead run. The CrashLoopBackOff troubleshooting guide covers the full cause list; in the drill you only need the branch order.
Branch on evidence. A stack trace or missing environment variable means fix config or code in the Deployment, not the pod. Clean logs followed by a restart, with Liveness probe failed in Events, means the probe killed a slow starter; add a startupProbe or widen the liveness window. Exit code 0 with a long-running Deployment means the process finished its work and exited; check the command and args. Exit code 137 needs the OOMKilled branch in Drill 6 before you touch limits.
Say it aloud: "CrashLoopBackOff is a waiting state, not the root cause. I read lastState and previous logs first. If the app failed on startup, I fix the config it names. If Events show probe kills, I fix probe timing. I would not raise limits until memory evidence exists." Trap that loses marks: deleting the pod as step one, which destroys previous logs and repeats the same crash.
4. Drill 2 in Kubernetes interview troubleshooting drills: ImagePullBackOff
In Kubernetes interview troubleshooting drills, ImagePullBackOff sits in the image layer: the kubelet cannot pull the container image and is backing off. Read the exact registry error in Events first. Wrong tag, missing pull secret, denied registry access, and node network failure each need a different fix, so never guess from status alone.
Prompt: a new Deployment never starts and the pod sits in ImagePullBackOff while older pods on the same node run fine. That last detail matters. The node can pull some images, so start with the image reference and credentials for this workload. Registry error text in Events names the exact failure, so read it word for word before acting.
Branch on the Events text. manifest unknown or not found means the tag or repository path is wrong; fix the image reference in the Deployment and check the pipeline that produced it. unauthorized or denied means imagePullSecrets are missing, expired, or attached to the wrong ServiceAccount. A timeout means registry reachability from the node, DNS for the registry host, or a proxy rule. ErrImagePull followed by backoff is the same family with an earlier failure.
Say it aloud: "The container never ran, so logs will not help. I read the pull error, verify the exact image string, then check pull secrets on the ServiceAccount. I fix the reference or credentials in desired state and watch the rollout." Trap: editing the pod directly or pulling by hand on one node, which proves little and fixes nothing for the next node.
5. Drill 3 in Kubernetes interview troubleshooting drills: Pending pods
In Kubernetes interview troubleshooting drills, a Pending pod has not been placed on a node, so the container has never run and logs cannot help. Read the FailedScheduling event, which lists why each node was rejected. Resource requests, taints, affinity rules, quotas, and unbound volumes each leave a distinct message to branch on.
Prompt: a pod stays Pending for twenty minutes after a scale-up. Strong candidates go straight to Events instead of restarting anything. The Pending pod scheduler triage guide walks the same branches with more depth.
Branch on the scheduler message. Insufficient cpu or Insufficient memory compares requests against node allocatable capacity, not current usage; lower the request to a measured value or add capacity. had untolerated taint means add a toleration or remove the taint if it was applied by mistake. didn't match Pod's node affinity/selector means a label is missing or the rule is too strict. A quota rejection names the namespace ResourceQuota. An unbound PVC message moves you to Drill 9.
Say it aloud: "Pending means scheduling failed, so I read FailedScheduling first and fix the exact rejection: request size, toleration, label, quota, or volume binding. Restarting nodes would not change any of those." Trap: reading kubectl top and arguing the cluster looks empty, while requests already reserve the capacity the scheduler counts.
6. Drill 4 in Kubernetes interview troubleshooting drills: Service with no endpoints
In Kubernetes interview troubleshooting drills, a Service with no endpoints means no ready pod currently matches the Service selector, so traffic has nowhere to go. Check EndpointSlices, pod labels, readiness, and targetPort in that order. Selector mismatch is common, but unready pods and wrong ports produce the same empty result and need different fixes.
Prompt: pods show Running, the Service exists, and clients get connection refused. Running is not Ready, and that distinction is the drill. The Service no endpoints guide covers the full wiring check.
Branch in order. If labels do not match the Service selector, align them in the Deployment template and the Service, watching for a renamed label during a rollout. If labels match but pods are not Ready, read readiness probe failures in Events and fix the probe path, port, or application health endpoint. If endpoints exist but requests still fail, check targetPort against the container port the process actually listens on, and test the pod IP directly to separate Service wiring from application failure.
Say it aloud: "Empty endpoints mean the selector found no ready pods. I compare selector and labels, then readiness, then targetPort. I would not touch Ingress until endpoints exist, because Ingress cannot route to backends that are not there." Trap: blaming DNS or NetworkPolicy before proving endpoints exist.
7. Drill 5 in Kubernetes interview troubleshooting drills: DNS failures
In Kubernetes interview troubleshooting drills, DNS failure means pods cannot resolve names, while direct IP traffic may still work. Test resolution from a debug pod, check CoreDNS pods and logs, then inspect resolv.conf search domains and ndots. A NetworkPolicy change that blocks port 53 is a frequent trigger after segmentation work.
Prompt: after a namespace policy rollout, applications time out calling other Services by name, yet curl to a pod IP works. That split is the clue: the connection path is open, name resolution is not. The Kubernetes DNS troubleshooting guide covers CoreDNS and ndots behaviour in depth.
Branch on the test result. NXDOMAIN for a valid Service name points at wrong namespace suffix, search domain expansion, or a missing Service. Timeout with no servers reached points at blocked egress to CoreDNS, CoreDNS pods down, or the kube-dns Service itself. Slow resolution of external names with many search domains points at ndots expansion multiplying queries; fix dnsConfig or use fully qualified names where the application allows it.
Say it aloud: "IP works and names fail, so I test DNS first, then CoreDNS health, then policy egress on UDP and TCP 53. I would not restart the application pods, because they will inherit the same resolver path." Trap: restarting CoreDNS before checking whether a default-deny policy blocks the queries.
8. Drill 6 in Kubernetes interview troubleshooting drills: OOMKilled and exit 137
In Kubernetes interview troubleshooting drills, OOMKilled with exit code 137 means the kernel sent SIGKILL after the container exceeded its memory limit. Prove it from lastState reason and memory usage history, then right-size the limit from measured working set or fix the leak. Removing the limit trades one outage for node pressure.
Prompt: a service restarts twice a day with clean application logs and no stack trace. Clean logs plus sudden death should make you look for a kill, not a crash. The OOMKilled troubleshooting guide separates cgroup kills from node memory pressure.
Branch on reason and trend. Reason: OOMKilled with usage climbing to the limit means the working set outgrew the limit or the process leaks; graph memory over several restarts before choosing. A flat usage line that spikes during one request type points at a payload or cache path to fix in code. Exit 137 without OOMKilled reason can come from another SIGKILL path, such as a probe kill after SIGTERM timeout, so read Events before concluding.
Say it aloud: "137 is 128 plus signal 9. I confirm OOMKilled in lastState, compare usage history with the limit, then set the limit from the measured working set with headroom and track the leak separately." Trap: doubling the limit on the spot with no usage evidence, which interviewers read as guessing.
9. Drill 7 in Kubernetes interview troubleshooting drills: Node NotReady
In Kubernetes interview troubleshooting drills, Node NotReady means the control plane stopped receiving healthy kubelet status, or a node condition failed. Read node conditions and kubelet signals first, check whether pods were evicted or only marked unreachable, and separate node failure from network partition before draining or replacing anything in production.
Prompt: one node flips to NotReady during a deploy and several pods show Unknown. The interviewer wants blast-radius thinking: is the node dead, is the kubelet stuck, or is the network path between node and control plane broken? Each answer changes whether pods keep serving.
Branch on conditions. Ready: False with kubelet stopped posting status points at kubelet failure, node overload, or a hung runtime; check kubelet and container runtime logs on the node if access exists. DiskPressure or MemoryPressure conditions point at node resource exhaustion and eviction thresholds. Ready: Unknown suggests the control plane cannot reach the kubelet, which can be a network partition where pods may still run; deleting pods blindly can duplicate stateful workloads.
Say it aloud: "I read node conditions first to separate kubelet failure, pressure, and partition. Then I check which pods are affected and whether they still serve. I cordon before draining, and I treat Unknown differently from a confirmed dead node." Trap: force-deleting pods on an unreachable node without considering that the originals may still be running.
10. Drill 8 in Kubernetes interview troubleshooting drills: NetworkPolicy blocks
In Kubernetes interview troubleshooting drills, NetworkPolicy failure means selected pods lost traffic after policy rules narrowed what is allowed. List every policy selecting the source and destination pods, remember allow rules union together, and test DNS egress separately. Also prove the CNI enforces policy, because some setups silently ignore it.
Prompt: a segmentation change lands and one namespace can no longer reach a database Service, while other namespaces work. The timing points at policy, but a strong answer still proves enforcement and selection instead of assuming. Selector and peer traps account for most surprise blocks after a policy change.
Branch on selection and peers. A default-deny policy with no DNS egress rule breaks names first, which Drill 5 isolates. A podSelector that matches nothing isolates nobody, so the policy looks applied but does nothing. Peer entries combine with AND inside one entry and OR across entries; mixing namespaceSelector and podSelector carelessly allows far more or far less than intended. If traffic still flows despite a deny test, the CNI may not enforce policy at all.
Say it aloud: "I find which policies select both pods, check the union of allow rules for this flow, test DNS and the Service port from inside the source pod, and verify CNI enforcement before editing rules." Trap: adding a broad allow-all policy to restore traffic, which passes the drill symptom and fails the security intent.
11. Drill 9 in Kubernetes interview troubleshooting drills: PVC pending
In Kubernetes interview troubleshooting drills, a PVC stuck Pending means no PersistentVolume satisfied the claim, so the pod cannot start with its volume. Read claim Events and the StorageClass first. Provisioner failure, access mode mismatch, capacity, topology, and WaitForFirstConsumer timing each need a different correction, so name the exact blocker.
Prompt: a StatefulSet pod stays Pending and the claim shows Pending for an hour. This drill tests whether you follow the dependency chain from pod to claim to StorageClass to provisioner instead of restarting the pod. Follow the chain from claim to StorageClass to provisioner instead of guessing at the pod.
Branch on Events. waiting for first consumer with WaitForFirstConsumer is expected until a pod schedules, so check the pod scheduler message as well. Provisioner errors name cloud quota, missing CSI driver, or a bad parameter in the StorageClass. Access mode mismatch, such as ReadWriteMany requested from a block-only class, needs a different class or access mode. Topology errors mean the volume zone and pod placement constraints disagree.
Say it aloud: "The pod waits on storage, so I read PVC Events, confirm the StorageClass provisioner and binding mode, then check capacity, access mode, and zone. I fix the claim or class, not the pod." Trap: deleting and recreating the claim without reading Events, which can lose the one message that named the quota or driver fault.
12. Drill 10 in Kubernetes interview troubleshooting drills: CPU throttling
In Kubernetes interview troubleshooting drills, CPU throttling means the container hit its CFS CPU quota and the kernel paused it for the rest of each period, raising latency while CPU graphs look modest. Prove throttling from cgroup statistics or metrics, then compare limits, requests, and p99 latency before changing values.
Prompt: a service shows high p99 latency, CPU usage near 60 percent, and no restarts. Candidates who only read usage graphs miss the mechanism. CFS quota is enforced in short periods, which is why average usage graphs hide the pauses.
Branch on throttling evidence. Rising nrthrottled and throttledtime counters, or a throttling ratio metric climbing with latency, confirm quota pauses. A limit far below the request pattern of a bursty, multi-threaded process causes throttling even at moderate average usage, because quota is enforced per period, not per minute. If throttling counters stay flat, move to downstream latency, connection pools, and node pressure instead.
Say it aloud: "Average CPU can hide per-period quota pauses. I check throttling counters against p99 latency, then decide whether to raise or remove the CPU limit, keep a sane request for scheduling, and measure again." Trap: raising replicas first, which spreads load but leaves every replica throttled under the same tight limit. A short YAML reminder for the fix discussion:
13. Drill matrix, scoring rubric and final checklist for Kubernetes interview troubleshooting drills
Use this closing section of Kubernetes interview troubleshooting drills to run mixed rounds: pick two symptoms at once, keep the five-minute budget, and score layer naming, confirming command, branch order, exact fix, evidence protection, and prevention. The matrix below maps each symptom to its first command so revision stays fast and honest.
| Drill | Symptom | First command | Branch that decides the fix |
|---|---|---|---|
| 1 | CrashLoopBackOff | kubectl logs --previous |
Exit code and probe Events |
| 2 | ImagePullBackOff | kubectl describe pod |
Registry error text |
| 3 | Pending pod | kubectl describe pod |
FailedScheduling message |
| 4 | No endpoints | kubectl get endpointslices |
Selector, readiness, targetPort |
| 5 | DNS failure | nslookup from debug pod |
NXDOMAIN versus timeout |
| 6 | OOMKilled | kubectl describe pod |
lastState reason and usage trend |
| 7 | Node NotReady | kubectl describe node |
Ready condition and pressure |
| 8 | Policy block | kubectl get networkpolicy |
Selecting policies and peers |
| 9 | PVC pending | kubectl describe pvc |
Provisioner and binding mode |
| 10 | CPU throttling | cgroup cpu.stat |
Throttled counters versus latency |
Scoring rubric for a mixed round, ten points total: layer named before action (2), confirming command chosen and explained (2), causes ordered with the common one first (2), exact fix naming the field or object (2), mitigation that preserves evidence (1), prevention step stated (1). Score 8 to 10 and the round is interview ready. Score 5 to 7 and repeat the weak drills with the matrix covered. Below 5, slow down and rehearse the seven-step spoken structure from section 2 before adding time pressure.
Worked mixed example: the prompt gives a Service returning errors and one pod in CrashLoopBackOff on the same node as a NotReady warning. Resist treating this as one fault. Split it into three evidence streams: endpoints for the Service, exit code and previous logs for the pod, and node conditions for the node. State which stream you read first and why, usually the user-facing Service path, then move to the pod, then the node. Interviewers reward that separation because production faults often arrive together without sharing a cause, and merging them early produces confident answers built on coincidence. Close the mixed round by verifying each stream separately: endpoints populated, restarts stable, node condition explained.
Final checklist before any interview round:
- Read status, restarts, node, and age before changing anything.
- Use describe Events and previous logs as the first evidence source.
- Say the layer and hypothesis aloud before running the confirming command.
- Branch on exact error text, exit code, condition, or counter values.
- Fix desired state in the Deployment, Service, policy, claim, or node object.
- Protect evidence: no early pod deletion, no blind restarts, no limit guesses.
- Close every answer with mitigation, verification, and one prevention step.
- Verify recovery with endpoints, readiness, logs, and the user-facing check.
Frequently Asked Questions
What are Kubernetes interview troubleshooting drills and how should I practise them?
Kubernetes interview troubleshooting drills are timed scenario exercises where you diagnose a broken workload aloud. Practise one symptom at a time for five minutes: restate the symptom, name the layer, run the confirming command, branch on evidence, state the exact fix, then score your path with the rubric in this guide.
In Kubernetes interview troubleshooting drills, what is the first command for CrashLoopBackOff?
Run kubectl describe pod to read the exit code and Events, then kubectl logs with --previous to read the run that died. Exit code 1 points at the application, 137 at SIGKILL, 127 at a missing command, and clean logs with probe failures point at liveness timing.
How do Kubernetes interview troubleshooting drills handle a pod stuck Pending?
Treat Pending as a scheduling or binding failure, because the container never ran. Read the FailedScheduling event in kubectl describe pod, then fix the exact rejection: request size, untolerated taint, affinity label, namespace quota, or an unbound PVC. Restarting nodes does not change those inputs.
In Kubernetes interview troubleshooting drills, why does a Service have no endpoints?
No ready pod matches the Service selector. Check EndpointSlices first, then compare pod labels with the selector, confirm pods pass readiness probes, and verify targetPort matches the listening container port. Do not debug Ingress until endpoints exist, because Ingress cannot route to missing backends.
How should I answer DNS questions in Kubernetes interview troubleshooting drills?
Test name resolution from a debug pod with nslookup, check CoreDNS pods and logs in kube-system, and read the pod resolv.conf. NXDOMAIN suggests wrong name or search domains, while timeouts suggest blocked port 53 egress or unhealthy CoreDNS. IP traffic working while names fail is the key split.
In Kubernetes interview troubleshooting drills, how do I prove OOMKilled?
Read lastState in kubectl describe pod and look for Reason OOMKilled with exit code 137, which is 128 plus SIGKILL. Compare memory usage history with the container limit, then right-size from the measured working set or fix the leak. Exit 137 alone is not proof without the reason.
What scoring rubric works for Kubernetes interview troubleshooting drills?
Score ten points per drill: layer named before action (2), confirming command explained (2), causes ordered most common first (2), exact fix naming the field or object (2), evidence-preserving mitigation (1), and a prevention step (1). Repeat drills scoring below 8 with the matrix covered.
Preparing for Senior Platform & SRE Interviews
Practice real-world cluster triage, RBAC debugging, and pod scheduling scenarios in our Kubernetes scenario interview questions hub.
Explore Interview Scenarios →