Skip to content

Liveness probe failed

The kubelet ran the liveness probe, it failed failureThreshold times in a row, and the kubelet restarted the container.

  1. What does the probe check, and how patiently? kubectl get pod <pod> -o jsonpath='{.spec.containers[*].livenessProbe}'. Note timeoutSeconds (default 1), periodSeconds (default 10), and failureThreshold (default 3).
  2. When does it fail: at startup, under load, or at random? Startup failures point at a missing startup probe. Load failures point at a timeout that’s too short or a health check that does real work.
  3. Call the endpoint yourself from inside the pod and time it, if the image has a shell: kubectl exec <pod> -- sh -c 'time wget -qO- localhost:8080/healthz'.
Symptom Cause
Fails only during startup No startup probe, so liveness starts before the app is ready
context deadline exceeded under load or during GC timeoutSeconds: 1 is too short
All replicas restart together The health check calls a shared dependency (database, cache) that blipped
exec probe fails with executable file not found The probe runs a tool that isn’t in the image (common with distroless)

Add a startup probe for slow starters, set a realistic timeout, and make the liveness endpoint check only that the process can respond. Never check dependencies in liveness.

Read next: Probes and resource limits.