Menu

Your liveness probe should not call the database
📰

Your liveness probe should not call the database

DEV Community: kubernetes·Hritik Chaudhary·about 13 hours ago
#w8vhOSjg
#devtokubernetes#devto#dev#liveness#probe
Reading 0:00
15s threshold

A liveness probe is meant to recover one stuck container. Configured badly, it restarts every healthy pod you have at the same moment, and a 30 second blip becomes an outage.

Here is how that happens, and how to set the three probes so it does not.

Three probes, three jobs

Kubernetes gives a container three probes. They look alike in YAML and do very different things when they fail.

Startup probe : has the app finished starting? Until it passes, the other two probes do not run.

Readiness probe : can this pod take traffic right now? If it fails, the pod is removed from the Service endpoints. It is not restarted.

Liveness probe : is this process stuck beyond recovery?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.