Liveness and readiness probes fighting — healthy app killed repeatedly
Pod restarts repeatedly but application logs show no errors
Focused incident mode — strips away everything but this runbook.
Symptoms
- Pod restarts repeatedly but application logs show no errors
- kubectl describe shows liveness probe failed, followed by container killed
- Pod is removed from endpoints (unready) immediately after becoming ready
Liveness should only check 'is the process alive', not 'is the app ready'. Use separate endpoints: /healthz/live for liveness, /healthz/ready for readiness.
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Probe failure events
kubectl describe pod <pod> -n <namespace> | grep -E 'Liveness|Readiness' | tail -20Probe configuration
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.containers[*].livenessProbe}'
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- liveness initialDelaySeconds < actual app startup time
- liveness timeoutSeconds too short for the health endpoint under load
Confirm before fixing
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.containers[0].livenessProbe.initialDelaySeconds}'Read the liveness initial delay
Fix
kubectl patch deployment/<deploy> -n <namespace> --type merge -p '{"spec":{"template":{"spec":{"containers":[{"name":"<c>","livenessProbe":{"initialDelaySeconds":30,"periodSeconds":10,"timeoutSeconds":5}}]}}}}'Increase initialDelaySeconds and timeoutSeconds for liveness
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
kubectl describe pod <pod> -n <namespace> | grep -E 'Liveness|Readiness' | tail -20Read the probe failure timeline
kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.containers[*].livenessProbe}'Read the liveness probe config
kubectl patch deployment/<deploy> -n <namespace> --type merge -p '{"spec":{"template":{"spec":{"containers":[{"name":"<c>","livenessProbe":{"initialDelaySeconds":30,"periodSeconds":10}}]}}}}'Relax liveness timing
kubectl rollout status deployment/<deploy> -n <namespace>Verify the rollout completes without restarts
Prevention
- Use separate endpoints for liveness (/live) and readiness (/ready).
- Add startupProbe for any container that takes >30s to start.
- Set liveness timeoutSeconds >= 2x the worst-case response time.
- Monitor pod restart rate and alert on restarts > 3 in 5 minutes.
Related runbooks
Same stack, same failure family — worth a skim.
kubectl get pods shows CrashLoopBackOff status
kubectl rollout status hangs on 'Waiting for rollout to finish'
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.