防止kubernetes崩溃循环中的退避 [英] Prevent back-off in kubernetes crash loop

查看:114
本文介绍了防止kubernetes崩溃循环中的退避的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个装有一些糟糕的越野车软件的吊舱. Kubernetes很棒的原因之一是它会在崩溃时重新启动软件,真是太棒了.

I have a pod with some terrible, buggy software in it. One reason Kubernetes is great is that it'll just restart the software when it crashes, which is awesome.

Kubernetes是为好的软件而设计的,而不是糟糕的软件,因此在重新启动Pod时会进行指数级的补偿.这意味着我必须在两次崩溃之间等待五分钟,然后才能重新启动Pod.

Kubernetes was designed for good software, not terrible software, so it does an exponential backoff while restarting pods. This means I have to wait five minutes between crashes before my pods are restarted.

有什么方法可以限制kubernetes的退出策略吗?我希望将其更改为不超过三十秒,然后才能再次启动Pod.

Is there any way to cap the kubernetes backoff strategy? I'd like to change it to not wait longer than thirty seconds before starting up the pod again.

推荐答案

不幸的是,容器重启的最大退避时间对于节点可靠性而言是不可调整的(即,太多的容器重启会淹没节点).如果您绝对想在群集中进行更改,则需要

Unfortunately, the max back off time for container restarts is not tunable for the node reliability (i.e., too many container restarts can overwhelm the node). If you absolutely want to change it in your cluster, you will need to modify the max backoff time in the code, compile your own kubelet binary, and distribute it onto your nodes.

这篇关于防止kubernetes崩溃循环中的退避的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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