gpt4 book ai didi

kubernetes - Kubernetes CronJob concurrencyPolicy是否按预期工作?

转载 作者:行者123 更新时间:2023-12-02 12:15:30 28 4
gpt4 key购买 nike

由于Kubernetes docs

A cron job creates a job object about once per execution time of its schedule. We say “about” because there are certain circumstances where two jobs might be created, or no job might be created. We attempt to make these rare, but do not completely prevent them. Therefore, jobs should be idempotent



而且CronJob也具有参数:concurrencyPolicy(允许,禁止)

因此,我是否可以期望如果将concurrencyPolicy = Forbidden设置为CronJob始终在单个实例中运行?

最佳答案

在某些情况下,CronJob每次运行可以调度多个Job,这是CronJob并发性,默认情况下设置为Allow

将策略设置为Forbid时,为it won't allow Jobs to be started until previous Jobs have completed or timed out

因此,基本上,使用Forbid策略,如果先前的运行仍处于 Activity 状态,则将跳过即将到来的Jobs。

关于kubernetes - Kubernetes CronJob concurrencyPolicy是否按预期工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57106554/

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