HorizontalPodAutoscalerBehavior

io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior source ↗

HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).

scaleDownHPAScalingRulesscaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).
policies[]HPAScalingPolicypolicies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.
periodSecondsinteger (int32) requiredperiodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
typestring requiredtype is used to specify the scaling policy.
valueinteger (int32) requiredvalue contains the amount of change which is permitted by the policy. It must be greater than zero
selectPolicystringselectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
stabilizationWindowSecondsinteger (int32)stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
toleranceQuantitytolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%).For example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi.This is an alpha field and requires enabling the HPAConfigurableTolerance feature gate.
scaleUpHPAScalingRulesscaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:
  • increase no more than 4 pods per 60 seconds
  • double the number of pods per 60 seconds
No stabilization is used.
policies[]HPAScalingPolicypolicies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.
periodSecondsinteger (int32) requiredperiodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
typestring requiredtype is used to specify the scaling policy.
valueinteger (int32) requiredvalue contains the amount of change which is permitted by the policy. It must be greater than zero
selectPolicystringselectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
stabilizationWindowSecondsinteger (int32)stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
toleranceQuantitytolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%).For example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi.This is an alpha field and requires enabling the HPAConfigurableTolerance feature gate.