Kubernetes-容器启动后执行Readiness Probe执行 [英] Kubernetes - Readiness Probe execution after container started

查看:64
本文介绍了Kubernetes-容器启动后执行Readiness Probe执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦容器成功启动,是否有一种方法可以阻止执行就绪探针?我认为活度探针应该足以监视容器的健康状况.

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.

推荐答案

就绪和活跃性探查的目的略有不同.

The readiness and liveness probes serve slightly different purposes.

就绪性"探针控制Pod IP是否包含在服务的端点列表中,并控制在通过外部URL公开时是否包含路由目标.

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.

活动性探针确定Pod是否仍在正常运行,还是应该重新启动它.

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

从技术上讲,应用程序仍可以正常运行,但可能积压了,因此您想使用就绪探针将其从服务的一组端点中临时删除,以避免进一步的请求被路由并被阻塞当该特定Pod的请求队列中有另一个Pod可以处理它时.

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.

这篇关于Kubernetes-容器启动后执行Readiness Probe执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆