⌂ 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.

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: 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 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.