[英]How to determine the kubernetes back-off period?
Considering that kubelet failed to perform some action - for instance pulling an image, the pod will go into a back-off state, for instance ImagePullBackOff
, how do I determine when will it be retried?考虑到 kubelet 未能执行某些操作 - 例如拉取图像,pod 将进入退避状态,例如
ImagePullBackOff
,我如何确定何时重试? I understand that the back-off uses increasing time intervals for retrying.我了解回退使用增加的时间间隔进行重试。 End it may eventually give up.
结束它可能最终会放弃。 Is there a clear algorithm so I can figure out the time to next attempt?
是否有明确的算法,以便我可以计算出下一次尝试的时间?
Apart from curiosity and ops convenience, it would help assess the self-healing recovery time needed.除了好奇心和操作方便之外,它还有助于评估所需的自我修复恢复时间。
At any point, the maximum delay is 300s, that's a compiled-in constant.在任何时候,最大延迟都是 300 秒,这是一个编译常量。
See the common info about ImagePullBackOff :查看有关 ImagePullBackOff 的常见信息:
The BackOff part indicates that Kubernetes will keep trying to pull the image, with an increasing back-off delay.
BackOff 部分表示 Kubernetes 将继续尝试拉取镜像,并增加回退延迟。
Kubernetes raises the delay between each attempt until it reaches a compiled-in limit, which is 300 seconds (5 minutes)
Kubernetes 会提高每次尝试之间的延迟,直到达到编译限制,即 300 秒(5 分钟)
and the restart policy :和重启策略:
After containers in a Pod exit, the kubelet restarts them with an exponential back-off delay (10s, 20s, 40s, …), that is capped at five minutes.
在 Pod 中的容器退出后,kubelet 以指数回退延迟(10 秒、20 秒、40 秒……)重新启动它们,上限为 5 分钟。 Once a container has executed for 10 minutes without any problems, the kubelet resets the restart backoff timer for that container
一旦容器执行了 10 分钟且没有任何问题,kubelet 会重置该容器的重启退避计时器
I can't tell you more than in official documentation.我只能在官方文档中告诉你更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.