Cloud-Native Backend Operations · Lesson 14

Production Kubernetes Backend Incident Troubleshooting

Diagnose Pending, image pull, crash, probe, OOM, rollout, capacity, and dependency failures from user impact to verified recovery.

Kubernetes incident response is a narrowing exercise. Status labels such as Pending, ImagePullBackOff, CrashLoopBackOff, and OOMKilled identify a layer or retry state, not the complete cause or customer outcome.

Quick answer

Bound user impact, identify the recent change, collect controller-to-business evidence, choose the safest reversible mitigation, verify business recovery, and preserve evidence for follow-up. Pending begins with scheduler conditions and events; image pull failures with reference, credentials, platform, and registry; crash loops with current and previous container state; probe failures with lifecycle purpose; OOM with process and container memory; rollout stalls with availability, readiness, and capacity. A restart, scale, or rollback command succeeding is not recovery proof.

Learning objectives

  • Route common Kubernetes symptoms to the smallest relevant evidence set and owner.
  • Separate mitigation completion from verified user, dependency, and durable-state recovery.

Prerequisites

Review Kubernetes Observability and Debugging and Production Incident Troubleshooting with Observability. Use the course and topic cluster.

Incident sequence

  1. Bound user impact. Identify affected routes, outcomes, tenants only through approved bounded dimensions, regions, and start time.
  2. Find the recent change. Record image digest, configuration revision, secret rotation, autoscaling or node event, and dependency changes.
  3. Classify the failing layer. Controller, scheduling, image distribution, runtime, process, probe, traffic, dependency, or business state.
  4. Collect decisive evidence. Prefer conditions, events, last termination, resource waits, traces, and durable state over repeated broad dumps.
  5. Mitigate reversibly. Pause rollout, shed work, restore compatible configuration, or revert artifact only within the approved runbook.
  6. Verify business recovery. Check user SLIs, successful commits, queue age, dependency saturation, and reconciliation.
  7. Preserve follow-up evidence. Record timing, commands, mutations, and remaining unknowns.

Production failure scenario

New Pods show CrashLoopBackOff. An operator deletes them repeatedly, then scales from 4 to 20. Every replacement starts the same incompatible configuration and creates a database connection burst. The error rate and recovery time increase.

Stop replica amplification, retain previous logs and termination evidence, compare the new configuration and digest, and use the approved rollback. Then verify order reads, writes, queues, and database saturation. Pod creation success is not business recovery.

Common misconceptions

  • CrashLoopBackOff is a retry policy state, not a root cause.
  • Pending does not always mean the cluster needs more nodes.
  • ImagePullBackOff may involve identity, name, platform, policy, or availability.
  • OOMKilled is not automatically a Java heap leak.
  • Rollback or scale commands do not prove customers recovered.

Decision checklist

  • Start with user impact and a precise incident window.
  • Preserve image, configuration, and workload identity before mutation.
  • Read Pod conditions, events, previous logs, and last termination state.
  • Avoid direct Pod edits that diverge from the controller source.
  • Prefer reversible, bounded mitigation with explicit stop conditions.
  • Verify business recovery and record unknown external outcomes as unproved.

Finish with the Kubernetes Rollout Capacity Lab.

Official sources

Knowledge check

Check your understanding

Answer both questions correctly to mark this lesson as mastered. You can retry without penalty.

1. A new release enters CrashLoopBackOff and rollback command execution succeeds; when is recovery established?

2. Order Pods are Pending after a rollout; what is the first layered diagnostic step?