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
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.