Liveness & Readiness Probe Failure Loop
Stop cascading restart storms caused by slow startup times or database checks inside livenessProbe.
Root Cause
Kubelet marked the container unhealthy after failureThreshold consecutive probe timeouts or non-2xx HTTP responses and restarted it.
How to Fix
- Move slow boot protection into a startupProbe rather than lengthening livenessProbe.
- Keep livenessProbe strictly local (event loop / process health); put external DB/Redis dependency checks in readinessProbe only.
- Confirm probe port and HTTP path match the container's listening address (0.0.0.0, not 127.0.0.1 if called externally).
Diagnostic Commands
kubectl describe pod <pod> -n <ns> | grep -A 15 Events