Health Probes
Advanced
Overview
Kubernetes uses probes to know a container's health. A liveness probe restarts a container that has hung. A readiness probe controls whether a Pod receives traffic — failing it removes the Pod from Service endpoints without restarting it.
A startup probe protects slow-starting apps by holding off the other probes until the app has booted.
Probes can use HTTP GETs, TCP checks, or commands, with tunable timing like initialDelaySeconds and periodSeconds.
Cheatsheet
livenessProbe.httpGetRestart if this endpoint failsreadinessProbe.httpGetGate traffic on this endpointstartupProbeDelay other probes until startup doneinitialDelaySecondsWait before the first checkkubectl describe pod <name>See probe failures in EventsTry it
A safe, simulated terminal. Run the suggested commands to see typical output.
simulated terminal
Type a command and press Enter, or click a suggestion below to run it.
Quick quiz
1. What does a failing readiness probe do?
2. Which probe is designed for slow-starting applications?