Kubernetes - Readiness Probe execution after container started

不羁岁月 提交于 2019-12-10 13:43:51

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/44309291/kubernetes-readiness-probe-execution-after-container-started

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!