Member-only story

Do we need liveness and readiness probes in Kubernetes deployments?

Madeesha’s Tech Space
3 min readJan 28, 2021

--

One of the most common question with the Kubernetes deployment is, do we really need liveness or readiness probes? The simple answer to this question is ‘YES’, let’s dive into more details so that you will understand why.

Liveness and readiness are the two main probe types available in Kubernetes deployments. Liveness and Readiness Probes in Kubernetes are basically methods to check the health of a container from the outside. Though their configuration is almost similar, these two probes have two different meanings to the platform. Following methods will be used as probes to measure the health of a container,

Exec Probe - Executes a gicen commands in container and expects 0 as exit code
TCP Socket probe - Test for Succesful TCP connection
HTTP probe - performs HTTP GET method and expects a succesful response

Liveness probe is used to know when to restart the container. For instance if a container is unresponsive due to deadlocked, critical bit of process may be halted, however by restarting the container we can make the application more available despite the bug. Liveness probes are really benifical in this kind of scenario as it restarts the failing container automatically.

Readiness probe is used to decide whether a container is ready to receive…

--

--

No responses yet