livenessProbe: tells Kubernetes whether the container is still alive. If it fails repeatedly, Kubernetes restarts the container.readinessProbe: tells Kubernetes whether the container is ready to receive traffic. If it fails, the pod stays running but is removed from Service load balancing.startupProbe: tells Kubernetes whether the app has finished starting up. While it is still failing, Kubernetes suppresses liveness/readiness handling for slow-starting apps.
Typical behavior:
- Use
livenessProbeto detect deadlocks/hung processes. - Use
readinessProbeto gate traffic until dependencies/init work are done. - Use
startupProbewhen startup is slow and you don’t want liveness to kill the app too early.
Simple mental model:
- liveness = “Should I restart it?”
- readiness = “Should I send traffic to it?”
- startup = “Has it booted yet?”
In practice:
- A failing
livenessProbecan restart the pod. - A failing
readinessProbewill not restart it; it just marks it unready. - A configured
startupProbegets checked first during boot; once it succeeds, normal liveness/readiness probing takes over.