问题描述
Kubernetes水平Pod自动缩放中是否配置了此功能,以指定在向上/缩小之前运行或创建的Pod的最小延迟?
Is their a configuration in Kubernetes horizontal pod autoscaling to specify a minimum delay for a pod to be running or created before scaling up/down?
例如,类似以下内容:
# I am looking for a flag like this
--horizontal-pod-autoscale-initial-upscale-delay=5m0s
# Similar to these existing flags
--horizontal-pod-autoscaler-downscale-delay=2m0s
--horizontal-pod-autoscaler-upscale-delay=2m0s
结果是:
- 等待5分钟,然后再出现任何高档
- 5分钟后,最多每2分钟执行一次降级操作
我遇到一种情况,即Pod在启动时会消耗大量资源进行引导(这是预期的),但我不希望在此期间对其进行扩展,并且一旦完成引导程序,它就有资格进行自动扩展. /p>
I have a situation where a Pod consumes lots of resources on start-up for bootstrapping (which is expected) but I don't want it scaled during this time, and once bootstrap is done it may be eligible for autoscaling.
推荐答案
此标志实际上存在:--horizontal-pod-autoscaler-cpu-initialization-period
此外,您还需要考虑就绪延迟:--horizontal-pod-autoscaler-initial-readiness-delay
和度量标准循环时间--horizontal-pod-autoscaler-sync-period
,以计算总(最大/最小/平均)延迟.
This flag actually exists: --horizontal-pod-autoscaler-cpu-initialization-period
In addition you need to consider the readiness delay: --horizontal-pod-autoscaler-initial-readiness-delay
and the metric loop time, --horizontal-pod-autoscaler-sync-period
to calculate the total (max/min/average) delay.
请参见 https://kubernetes.io/docs/tasks /run-application/horizontal-pod-autoscale/
这篇关于Kubernetes水平Pod自动缩放初始延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!