The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Kubernetes HPA does not necessarily remove pods as soon as a metric falls. Its scale-down stabilization window looks at recent replica recommendations and favors the highest one; scaling policies separately cap how quickly replicas may change. Together, these settings smooth short-lived drops in demand while letting you control the pace of scale-down.
Why is my HPA not scaling down right away?
HPA is an intermittent control loop, not an instant reaction to every metric change. The documented default controller sync period is 15 seconds: on each reconciliation, it reads available metrics, calculates a desired replica count, and considers whether to scale. The actual timing also depends on the target cluster’s Kubernetes release and controller-manager configuration.
As an Amazon Associate I earn from qualifying purchases.
By default, scale-down uses a 300-second (five-minute) stabilization window. Before scaling, the controller considers recent recommendations and uses the highest recommendation in that window. If recommendations recently fell from 12 to 9 to 7 replicas and the current calculation is 7, the HPA may continue to use 12 while that higher recommendation remains in the window. This is the documented algorithm illustrated with example values, not a promise about every workload’s timing.
The window smooths rapid fluctuations; it is not a fixed minimum replica count. The HPA API also applies the configured minimum replica count, and other metric or scaling conditions may affect the result. See the Kubernetes HPA algorithm documentation.
#1 Best Overall
What does the HPA downscale stabilization window do?
The HPA first derives a desired replica count from metrics. A simplified calculation for one metric is ceil(currentReplicas × currentMetricValue / desiredMetricValue). The real decision can be affected by tolerance, missing metrics, pod readiness, and other metric conditions. When multiple metrics are configured, HPA uses the largest desired replica count; an error retrieving one metric can prevent a scale-down another metric would otherwise suggest.
Before acting, the controller records recommendations. For downscale, it selects the highest recommendation within the configured window, rather than immediately following a lower value. The API field is spec.behavior.scaleDown.stabilizationWindowSeconds. The autoscaling/v2 API reference documents a default of 300 seconds and accepts values from 0 through 3600 seconds. Setting it to 0 removes this stabilization; a longer window can keep capacity available through longer transient dips, but delays reductions. The cluster-wide controller-manager setting --horizontal-pod-autoscaler-downscale-stabilization also has a documented five-minute default, so inspect the effective cluster configuration when a manifest leaves the value unspecified.
As the Kubernetes documentation puts it: “Finally, right before HPA scales the target, the scale recommendation is recorded.” See the autoscaling/v2 HPA API reference for the field definition and limits.
What is the difference between stabilizationWindowSeconds and scaling policies?
Stabilization chooses which desired replica recommendation to act on, using recent history. Policies constrain how much the replica count can change over a rolling time period. They solve different problems and can be configured together: the window avoids reacting too quickly to a temporary metric dip, while a policy limits the size or rate of a permitted change.
Rank #3
| Setting | What it controls | Documented scale-down default |
|---|---|---|
stabilizationWindowSeconds |
How far back HPA considers recommendations; downscale uses the highest within the window. | 300 seconds (five minutes), per the autoscaling/v2 API reference. |
policies |
Maximum replica change over each policy’s periodSeconds; a policy can express an absolute pod count or a percentage. |
If omitted, the API reference says the default permits removing all pods over a 15-second period. |
selectPolicy |
How HPA chooses among policies when more than one is configured. | Max, which permits the largest policy change, per the API reference. |
For scale-down, Pods specifies an absolute number of replicas and Percent a proportional change. selectPolicy: Max chooses the policy allowing the largest change; Min chooses the most restrictive amount; Disabled turns off scaling in that direction. With one policy, selection among multiple rules is not a practical choice; with several, it determines which limit governs.
How do I limit how many pods HPA removes at once?
Add a scale-down policy under spec.behavior.scaleDown. This example combines a five-minute stabilization window with a 10-percent policy over 60 seconds and uses Min to select the more restrictive change if additional policies are added:
Rank #4
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
spec:
behavior:
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 10
periodSeconds: 60
selectPolicy: Min
The example expresses a 300-second recommendation window and a policy allowing at most a 10-percent change over 60 seconds. It is illustrative, not a universal production recommendation. Unspecified behavior fields retain their defaults. Kubernetes’ HPA task guide demonstrates behavior configuration, including a Pods scale-down policy with selectPolicy: Min to impose a strict removal cap.
How can I make HPA scale down faster?
First identify which control is delaying the reduction. A shorter nonzero stabilization window makes the controller stop considering older, higher recommendations sooner; setting the window to 0 removes that buffer. A more permissive scale-down policy may also allow a larger change per policy period. If the policy is omitted, the documented default permits all pods to be removed over a 15-second period, so adding a restrictive policy can slow rather than accelerate scale-down.
There is no universally correct window or rate. Balance how quickly demand can fall and how volatile the chosen metrics are against pod startup and warm-up time and the cost of keeping spare capacity. Check the HPA manifest, cluster Kubernetes version, and effective controller-manager settings before changing values based on assumed defaults.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What else can affect a scale-down decision?
- Metrics availability: HPA can read resource, custom, or external metrics through the relevant aggregated APIs. The
metrics.k8s.ioAPI is commonly provided by Metrics Server, which must be installed separately. - CPU requests: For CPU utilization targets, resource requests affect the utilization calculation. If relevant container requests are missing, utilization may be undefined and HPA may take no action for that metric.
- Scalable target: The target needs to support the Kubernetes scale subresource. Deployments and StatefulSets are common HPA targets; DaemonSets cannot be scaled by HPA.
- Different autoscaling mechanisms: HPA changes replica counts. Vertical autoscaling changes resources allocated to pods.
Scale-to-zero has a separate metric-support constraint. In its announcement dated 2026-09-02, Kubernetes v1.37 described HPA scale-to-zero as beta for appropriate object or external metrics. CPU and memory resource metrics cannot support scale-to-zero because they require running pods to measure. This capability does not replace stabilization or policy configuration.
How should I choose the settings?
- Choose the window for metric behavior: Use a window long enough to ride out dips you do not want to trigger reductions, while accounting for the cost of retaining capacity.
- Choose the policy type for the limit you need: Use
Podsfor a fixed replica cap andPercentfor a limit proportional to the current scale. - Choose policy selection deliberately:
Maxfavors faster, larger changes;Minenforces the strictest configured limit. - Validate support and defaults: Check the cluster release, effective controller-manager configuration, target and metric types—especially if scale-to-zero is involved.
The Kubernetes references describe the mechanisms and defaults, not a workload-specific ideal. Application response, metric variability, startup time, and the cost of spare capacity determine the trade-off.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




