我们已配置为对 HPA 使用 2 个指标
在测试时,我们观察到了扩展的发生,但是副本数量的计算不是很清楚。我无法找到有关此的任何文档。
问题:
提前致谢!
最佳答案
If multiple metrics are specified in a HorizontalPodAutoscaler, this calculation is done for each metric, and then the largest of the desired replica counts is chosen. If any of those metrics cannot be converted into a desired replica count (e.g. due to an error fetching the metrics from the metrics APIs), scaling is skipped.
Finally, just before HPA scales the target, the scale recommendation is recorded. The controller considers all recommendations within a configurable window choosing the highest recommendation from within that window. This value can be configured using the
--horizontal-pod-autoscaler-downscale-stabilization-window
flag, which defaults to 5 minutes. This means that scaledowns will occur gradually, smoothing out the impact of rapidly fluctuating metric values
关于kubernetes - 具有 2 个或更多指标的 kubernetes HPA 如何表现 - 特别是副本数计算?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54302592/