Kubernetes Liveness vs Readiness vs Startup Probes
Master container lifecycle orchestration: Readiness probes for traffic gating, Liveness probes for deadlock recovery, Startup probes for slow boot processes, and preventing cascading cluster restart storms.
01.1. The Three Kubernetes Probe Types Explained
Kubernetes Kubelet uses three distinct probe types to manage the health and traffic routing of containerized workloads:
1. Startup Probe (startupProbe)
- Purpose: Protects slow-starting legacy applications (e.g., Spring Boot JVM apps, large machine learning models loading into RAM, or cold cache warming) from premature termination.
- Mechanism: When configured, Kubelet runs only the startup probe. All liveness and readiness checks are completely disabled until the startup probe passes.
- Failure Action: If the startup probe fails more than
failureThresholdtimes, the container is killed and restarted according to the pod'srestartPolicy.
2. Readiness Probe (readinessProbe)
- Purpose: Determines whether a pod is currently capable of accepting network traffic from the Kubernetes Service load balancer.
- Mechanism: Evaluated continuously throughout the pod's life (e.g., every 5 seconds).
- Failure Action: If readiness fails, the Kubernetes Endpoint Controller immediately removes the Pod's IP address from the
Endpoints/EndpointSliceobject. The container is NOT killed or restarted. It remains running, allowing it to cool down, drain backlogs, or reconnect to warm caches.
3. Liveness Probe (livenessProbe)
- Purpose: Detects catastrophic, unrecoverable internal failures (such as Java thread deadlocks, fatal memory leaks, or corrupted internal state).
- Mechanism: Evaluated continuously (e.g., every 10β15 seconds).
- Failure Action: If liveness fails for
failureThresholdconsecutive checks, Kubelet immediately sends aSIGKILLsignal to terminate the container and spawns a fresh replacement.
Kubernetes Container Health Probes Execution Lifecycle
Kubernetes Container Health Probes Execution Lifecycle
Startup probe guards slow boot initialization, Readiness probe dynamically gates load balancer traffic, and Liveness probe detects in-process deadlocks.
Unlock Topic #179: Kubernetes Liveness vs Readiness vs Startup Probes
You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.
Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.
Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.
Staff-level multiple-choice quiz questions with instant feedback and answer explanations.
Firebase Google authentication automatically syncs your completed topics and quiz scores.
How clear and staff-actionable was this system breakdown?