Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 40/ 160
02. Workload Controllers & Scaling

Troubleshooting Workload Failures (OOMKilled, ImagePullBackOff, Evicted)

Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook.

IntermediateOOMKilled · ImagePullBackOff · Evicted3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Troubleshooting is triage: OOM is the oxygen supply cutoff, image pull is missing equipment, and eviction is the evacuation order. The simple Kubernetes rule is: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Think of it like…

Troubleshooting is triage: OOM is the oxygen supply cutoff, image pull is missing equipment, and eviction is the evacuation order.

Where you’ve seen it

During a release or scale event, the workload owner runs kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous. Expected evidence: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers. If the run instead shows this symptom, stop and restore the last known state: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.

Words you’ll hear

OOMKilled
For this lesson, OOMKilled is the controlling idea: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
ImagePullBackOff
ImagePullBackOff is the checkpoint; run kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous and inspect the owner chain. OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.
Evicted
Evicted is the outcome to preserve; the cost is explicit: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.
Verification evidence
The evidence command is kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous. It connects the declaration to this behavior: Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook.

Visual diagram

Loading interactive diagram

Theory & deep dive

How OOMKilled reaches the intended state

Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook. Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

The concrete checkpoint is kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous; compare the OOMKilled owner, ImagePullBackOff state, and Evicted outcome instead of treating YAML acceptance as proof.

Verify ImagePullBackOff, not only object creation

Run kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous after the change and correlate the result with Events and the owning object. Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Key takeaway: OOMKilled is implemented only when this invariant remains observable: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

ImagePullBackOff: failure boundary and production cost

OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception. The prerequisite contract is concrete: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly. A safe design limits blast radius, records the last good configuration, and uses kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous as a deterministic rollback checkpoint.

Recover from ImagePullBackOff drift

Capture the current state with kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.

Key takeaway: Accept the trade-off consciously: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

How it works, step by step

Step 1 of 4
Workload author

1. Declare workload intent

Write the controller-owned Pod or scaling intent and preserve the owner chain: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

OOMKilled contract → owned state
Key numbers at this step
Goal
Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook.
Owner
OOMKilled

When to use it & trade-offs

What it is

Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook. Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Why it matters: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception. The invariant at risk is specific: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers. The quickest fact check before changing the design is kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous.

When to reach for it

  • Use OOMKilled to enforce this invariant: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
  • Use ImagePullBackOff evidence from kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous in reviews and incident timelines. Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook.
  • Choose the progressive-delivery layer route only when this cost is justified by governance or scale: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

When to avoid or be careful

  • Avoid assuming OOMKilled is complete after YAML submission; the required behavior is concrete: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
  • Avoid treating the next symptom as random; check the owner and state with kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous first: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.
  • Avoid adopting a heavier platform wrapper before measuring its cost: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

Native, manual, and managed paths for OOMKilled

Controller-managed workload
Best for: Diagnose OOMKills, image pull failures, and evictions with a repeatable playbook. A concrete incident check is kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous.

Strengths: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Watch out: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly. Recovery must also recognize this signal: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.

Hand-managed Pods
Best for: Quickly testing the ImagePullBackOff assumption with kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous; the expected invariant is: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Strengths: kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous gives immediate feedback without first building a platform layer.

Watch out: A manual change can hide drift, and unlike OOMKilled, it does not make this symptom self-documenting: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.

Progressive-delivery layer
Best for: Teams that need Evicted integrated with guardrails; the evidence path is kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous.

Strengths: Platform controls can wrap this exact behavior in policy or dashboards: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.

Watch out: The added platform ownership buys value at this cost: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

Interview signals & numbers to know

When this topic comes up

  • Interview anchor: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
  • Trace OOMKilled to Evicted through ImagePullBackOff; the invariant is: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
  • Recognize the symptom: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.
  • Justify the cost: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.
  • Verify with kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous instead of only inspecting YAML.

Benchmarks & rules of thumb

137 -
Linux OOMKilled commonly appears as exit code 137
429 -
an image registry throttling response can create repeated pull failures
3 -
primary branches: runtime, image/registry, and node pressure

Common mistakes & follow-ups

Common interview mistakes

  • Debugging only the child object misses the OOMKilled owner contract: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers.
  • Ignoring this telltale condition leads to unrelated changes: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception.
  • Repeating kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous without an owner for remediation wastes retry cost. A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

Likely interviewer follow-ups

  • How would API output and runtime evidence prove this behavior: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers?
  • Which owner object, logs, and Events would you inspect for this symptom-OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception-?
  • At what threshold would this cost become unacceptable: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly?
Interview tip: Interview sequence: state the invariant, run kubectl get pods -A; kubectl describe pod api-0; kubectl logs api-0 --previous, name the failure, then justify the cost. Invariant: Workload diagnosis follows Pod phase, Events, owner, image/runtime status, requests, and node conditions; OOMKilled, ImagePullBackOff, and Evicted expose different failure layers. Failure: OOMKilled points to a memory limit or node kill, ImagePullBackOff points to registry/image/auth, and Evicted points to node pressure or policy rather than an application exception. Cost: A systematic playbook reduces guesswork, but each signal must be correlated with the owning controller and node state to avoid fixing one replacement Pod repeatedly.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Troubleshooting Workload Failures (OOMKilled, ImagePullBackOff, Evicted) with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Lifecycle Management of AI/ML & GPU Workloads on Kubernetes
Next topic
Kubernetes Networking Model (Pod-to-Pod, Node-to-Pod, Flat Network)