Kubernetes unknown field “behavior”

后端 未结 3 1216
攒了一身酷
攒了一身酷 2021-01-24 00:49

I\'m creating a HorizontalPodAutoscaler in Kubernetes and I need to configure the downscale stabilization window to be smaller than the default. The code used and error are belo

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-24 01:15

    So it looks like this was a case of incorrect documentation that was corrected shortly after I asked my question. PR #18157 on kubernetes/website adds the following text to the page on the Horizontal Pod Autoscaler.

    Starting from v1.17 the downscale stabilization window can be set on a per-HPA basis by setting the behavior.scaleDown.stabilizationWindowSeconds field in the v2beta2 API. See Support for configurable scaling behavior.

    PR #18965 reverts the previous pull request since the behavior object is functionality targeted in 1.18, not 1.17.

    For now, the solution is to use the --horizontal-pod-autoscaler-downscale-stabilization flag on the controller manager as mentioned in @ShantyMan's answer above which will set the value for every HPA.

提交回复
热议问题