Kubernetes horizontal pod autoscaling initial delay?

橙三吉。 提交于 2020-06-27 10:07:08

问题


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?

For example with something like:

# 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

Having as a result:

  • Wait for 5 min before any upscale occur
  • After 5 min, perform a downscale at most every 2 min

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.


回答1:


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.

See https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/



来源:https://stackoverflow.com/questions/57375952/kubernetes-horizontal-pod-autoscaling-initial-delay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!