InterviewHubPRO
Section Overview
Q17

Question 17 of 50

Part 2: Kubernetes Architecture & Core Workloads (11 - 25)

34%
DevOps & Kubernetes (50 Qs)•Part 2: Kubernetes Architecture & Core Workloads (11 - 25)

Liveness, Readiness, and Startup Probes: Differences, failure thresholds, and avoiding probe death spirals.

Probe Architecture & Purpose

Kubernetes provides three distinct health probes executed periodically by the Kubelet. Using the wrong probe type or misconfiguring thresholds is the #1 cause of cascading cluster outages.

sql
[ Container Starts ]
        |
        v
+-------------------------+
|     Startup Probe       | --> Protects slow-starting legacy apps from premature kills.
+-------------------------+
        | (Succeeds)
        +-----------------------------------+
        |                                   |
        v                                   v
+-------------------------+       +-------------------------+
|     Liveness Probe      |       |     Readiness Probe     |
| (Is application alive?) |       | (Can app take traffic?) |
| Failed -> Restart Pod   |       | Failed -> Remove from   |
|                         |       | Service Endpoints       |
+-------------------------+       +-------------------------+

Comparison Matrix

Probe TypePurposeAction on FailureIdeal Target Check
StartupDisables liveness/readiness probes until the app has finished booting.Kills container and restarts per restartPolicy.Checks local process initialization / schema cache.
LivenessDetects deadlocks, infinite loops, and unrecoverable hangs.Kills container and restarts Pod.Shallow check: simple internal /healthz that does NOT check external DBs.
ReadinessDetermines if the Pod can accept user traffic.Keeps Pod running; removes Pod IP from Service Endpoints.Deep check: verify DB connection pool, Redis cache warm-up.

The Cascading "Liveness Death Spiral" Bug

Anti-Pattern: Making a Liveness Probe check the backend database (SELECT 1 FROM users).

If the database slows down under heavy load, all Liveness Probes fail simultaneously. Kubernetes kills and restarts every replica at the same time. The stampeding restart hammers the struggling database harder, causing total, unrecoverable system failure.

Best Practice: Liveness probes must only check that the internal process is responsive.