⌂ Home
Health Probes
Interactive guide to liveness, readiness, startup probes, and the different actions Kubernetes takes when checks fail.
All probes answer different questions. The most important learning point is not how to configure them, but what Kubernetes does after each probe type fails.
Concept
Flow
Examples
Compare
Practice
Core Model
Understand the Concept First
Liveness probe
Checks whether the container is still alive. Failure leads to a restart.
Readiness probe
Checks whether the container is ready to serve traffic. Failure removes the Pod from Service endpoints.
Startup probe
Protects slow-starting applications by delaying liveness and readiness behavior until startup succeeds.
Lifecycle Flow
Probe Decision Flow
Liveness Probe
Readiness Probe
Startup Probe
Side-by-Side
Liveness Probe: Container Restart Flow
Container Running
Process Active
Every 10s
Liveness Check
HTTP GET /healthz
or exec/tcp/grpc
Pass?
Yes
Continue
Container OK
Next check in 10s
No (3x)
RESTART Container
Kill & Recreate
Restart count++
Container restarts
Probe Timeline
✓
T=0s
✓
T=10s
✗
T=20s
✗
T=30s
✗
T=40s
RESTART
✓
T=60s
Readiness Probe: Traffic Control Flow
Pod Ready
In Service Endpoints
Traffic: Active
Every 10s
Readiness Check
HTTP GET /ready
or exec/tcp/grpc
Ready?
Yes
Keep in Service
Traffic continues
Next check in 10s
No
Remove from Service
NO Container Restart
Traffic stops
Can recover without restart
Service Endpoint Status
Pod Ready
Service Endpoint: pod-ip:8080 → Active
Pod Not Ready
Service Endpoint: pod-ip:8080 → Removed
Probe result controls endpoint membership
Startup Probe: Slow Boot Protection
Container Starting
Heavy initialization
Loading data...
Every 10s
Startup Check
HTTP GET /startup
Liveness DISABLED
Started
?
Yes
Hand Off
Startup probe stops
Liveness probe starts
Readiness probe starts
No
(30+ tries)
RESTART Container
Failed to start
Try again
Startup Protection Timeline
Startup Probe Active (liveness disabled)
✗
0s
✗
30s
✗
60s
✗
90s
✓
120s
Liveness/Readiness Active
✓
130s
Probe Comparison: Actions on Failure
Liveness
Question:
Is the process alive?
On Failure:
RESTART Container
Running
Probe
Fails 3x
KILL
and
RESTART
Readiness
Question:
Can it receive traffic?
On Failure:
Remove from Service
In
Endpoints
Probe
Fails
Remove
from
Service
Startup
Question:
Has startup finished?
On Success:
Enable Liveness
Starting
Up...
Startup
Succeeds
Enable
Liveness
Key Differences
Aspect
Liveness
Readiness
Startup
Restarts container?
YES
NO
YES (eventually)
Affects traffic?
NO
YES
NO
When active?
After startup
Entire lifetime
Only during startup
Readiness affects traffic. Liveness affects process restart. Startup protects slow boot sequences from false liveness failure.
YAML and Commands
Examples You Can Recognize Quickly
Liveness and Readiness Example
livenessProbe: httpGet: path: /healthz port: 8080 readinessProbe: tcpSocket: port: 5432
Observe Probe Behavior
kubectl get pod -w kubectl describe pod <pod-name>
Decision Guide
Probe Types and Outcomes
Probe
Question
Action on failure
Liveness
Is the process alive?
Restart the container
Readiness
Can this Pod receive traffic?
Remove Pod from Service endpoints
Startup
Has startup finished successfully?
Delay liveness/readiness reactions until successful
A readiness failure does not mean the Pod is dead; it only means traffic should stop going there for now.
Use It Well
Practice and Real-World Thinking
Hung processes
Use liveness probes to detect deadlocks or processes that stopped responding.
Safe traffic management
Use readiness probes to keep warming or degraded Pods out of client traffic.
Slow boots
Use startup probes for heavy applications that need extra warm-up time.