October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How Kubernetes HPA Scale-Down Stabilization and Behavior Policies Work

Kubernetes HPA uses recent replica recommendations to smooth scale-down and behavior policies to limit how quickly replicas change. Learn the defaults and configuration options.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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:

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.Support on Ko-Fi

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.io API 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 Pods for a fixed replica cap and Percent for a limit proportional to the current scale.
  • Choose policy selection deliberately: Max favors faster, larger changes; Min enforces 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.