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 fails
readinessProbe.httpGetGate traffic on this endpoint
startupProbeDelay other probes until startup done
initialDelaySecondsWait before the first check
kubectl describe pod <name>See probe failures in Events

Try 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?