简体   繁体   English

如何确定 Kubernetes 的回退期?

[英]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.

相关问题 防止 kube.netes 崩溃循环中的回退 - Prevent back-off in kubernetes crash loop 回退重启失败的容器 kubernetes - Back-off restarting failed container kubernetes 在 Kubernetes 中回退拉取镜像 - Back-off pulling image in Kubernetes 如何在没有 http 端点的情况下保持 Kubernetes pod 运行? (防止后退) - How do I keep a Kubernetes pod running with no http endpoint? (prevent back-off) kubernetes pod failed with Back-off restarting failed container - kubernetes pod failed with Back-off restarting failed container kubernetes/minikube / 警告 Back-off 重启失败的容器 - kubernetes/minikube / Warning Back-off restarting failed container 回退重启失败的容器openshift kubernetes - Back-off restarting failed container openshift kubernetes Kube.netes | Pod 状态 - CrashLoopBackOff | 退避重启失败的容器 - Kubernetes | Pod Status - CrashLoopBackOff | Back-off restarting failed container Kube.netes pod Back-off 重启失败的容器并出现 CrashLoopBack 错误 - Kubernetes pod Back-off restarting failed container with CrashLoopBack error 如何知道Elasticsearch的Back-off重启失败容器的原因 - how to know the reason of Back-off restarting failed container of elasticsearch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM