Lesson 2.3

Readiness and liveness probes

Readiness controls whether a pod receives traffic.

3mIntermediate9k students

Overview

Two probes with completely different jobs

Readiness controls whether a pod receives traffic. Liveness controls whether it gets killed and restarted. Confusing them causes real outages.

A liveness probe that checks a dependency is a distributed outage generator: when the database is briefly slow, every pod fails its probe and the whole deployment restarts, which makes recovery slower. Liveness should test only whether this process is stuck.

A slow-starting application needs a startup probe, otherwise the liveness probe kills it before it ever finishes booting — a restart loop that looks like a crash.

In this lesson you will:

  • Keep traffic away from pods that are not ready
  • Restart a process that is genuinely stuck
  • Give slow starters a startup probe

Resources

Previous Lesson
Next Lesson
Readiness and liveness probes — Kubernetes for Application Developers — Vertex