You have one URL for readiness and liveness. Why do deploys restart healthy pods?
The scenario
Both probes call a route that checks the database. During a brief database blip the pods restart, and the rollout never settles. The process itself was fine.
Model answer
What I'd say first:
I would take the dependency off liveness. Liveness should ask if the process is alive. Readiness should ask if it can serve. A database blip should remove the pod from traffic, not kill it.
How I'd work it:
- 1I read both probe definitions. They are the same URL.
- 2I confirm restarts line up with the dependency, not with a deadlock.
- 3I point liveness at a cheap local check, and readiness at the dependency.
- 4I tell the room we restarted pods that only needed to stop taking traffic.
How I'd explain it:
A failed liveness restarts the container. A failed readiness only pulls it out of the Service. Using one URL means every dependency blip is a crash. A wrong answer is a longer timeout on both.
How I'd prevent it:
Ship a probe helper that keeps the two checks different. Review any manifest where they match. A dependency failure test should show zero restarts and a readiness flap.
The follow-up they'll ask
“Give both probes a longer timeout so the blip fits?”
No. A longer timeout still restarts the pod when the dependency is actually down, and it delays the moment we stop sending traffic. I split the checks. That shortcut is how this comes back on the next shift.
Common mistakes
- One URL for both probes
- Restarting on a dependency blip
- A longer timeout as the design