Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes - Readiness Probe execution after container started

Is there a way to prevent readiness probe from execution once container has successfully started? I suppose that liveness probe should be enough to monitor container health.

like image 543
dplesa Avatar asked Jun 01 '17 13:06

dplesa


1 Answers

The readiness and liveness probes serve slightly different purposes.

The readiness probe controls whether the pod IP is included in the list of endpoints for a service, and so also whether a target for a route when it is exposed via an external URL.

The liveness probe determines whether a pod is still running normally or whether it should be restarted.

Technically an application could still be running fine, but is perhaps backlogged, and so you want to use the readiness probe to temporarily remove it from the set of endpoints for a service to avoid further requests being routed its way and simply being blocked in the request queue for that specific pod when another pod could handle it.

So I personally would agree the duplication seems strange, but it is that way so the different situations can be distinguished.

like image 88
Graham Dumpleton Avatar answered Oct 20 '22 21:10

Graham Dumpleton