gpt4 book ai didi

Kubernetes 作业和回退限制值 : is the value a number of retries or minutes?

转载 作者:行者123 更新时间:2023-12-02 11:34:21 24 4
gpt4 key购买 nike

我是 reading the Kubernetes documentation about jobs and retries .我找到了这个:

There are situations where you want to fail a Job after some amount of retries due to a logical error in configuration etc. To do so, set .spec.backoffLimit to specify the number of retries before considering a Job as failed. The back-off limit is set by default to 6. Failed Pods associated with the Job are recreated by the Job controller with an exponential back-off delay (10s, 20s, 40s …) capped at six minutes. The back-off count is reset if no new failed Pods appear before the Job’s next status check.



我对上面的报价有两个问题:
  • 回退限制值是分钟还是重试次数?使用值 的文档示例6(六)很困惑,因为他最初确认该值是重试次数,但之后说“上限为 分钟”。
  • 有没有办法定义回退延迟时间?据我了解,这种行为(10 秒、20 秒、40 秒……)是默认设置,无法更改。
  • 最佳答案

    没有混淆 .spec.backoffLimit is 是重试次数。

    作业 Controller 以指数延迟(10 秒、20 秒、40 秒、...、360 秒)重新创建失败的 Pod(与作业关联)。当然,这个延迟时间是由 Job Controller 设置的。

  • 如果 Pod 失败,10 秒后会创建新的 Pod
  • 如果再次失败,20 秒后将创建新的
  • 如果再次失败,40s后新的来
  • 如果再次失败,则在 80s(1m 20s)后出现下一个
  • 如果再次失败,则在 160s(2m 40s)后出现下一个
  • 如果再次失败,320s(5m 20s)后,新的Pod来了
  • 如果再次失败,360s(不是640s,因为它大于360s或6m)你会看到下一个
  • 关于Kubernetes 作业和回退限制值 : is the value a number of retries or minutes?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57417027/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com