DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Deployments

Why Kubernetes Pods Stay Above the HPA’s Desired Replica Count

By Freedom251 Team · · 4 min read

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.

Pods can remain above an HPA’s desiredReplicas because that value is the autoscaler’s latest calculated recommendation—not a live count of non-terminating Pods. Scale-down stabilization, HPA limits or metrics, a Deployment rollout, terminating Pods, or another system writing replicas can all explain the difference. Compare HPA status with Deployment status and rollout state before treating the discrepancy as a fault.

First, identify which replica count you are comparing

The HPA and Deployment report related but distinct observations. In HPA status, currentReplicas is the number of Pods the autoscaler last observed for its target, while desiredReplicas is the count it most recently calculated. Deployment status separately reports matching non-terminating Pods as replicas, alongside ready, available, updated, and unavailable counts. A terminatingReplicas field is available in supported versions.

As an Amazon Associate I earn from qualifying purchases.

Monitoring dashboards may show yet another count, such as all Pods still visible in a namespace. Check the resource and field behind the number: a Pod marked for deletion can remain visible during termination, even though it is no longer counted as a normal non-terminating replica. See the HPA API reference and Deployment API reference.

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

Why Pods may stay above the HPA recommendation

Scale-down is deliberately delayed or rate-limited

The HPA is an intermittent control loop, not an instantaneous reaction to every metric change. Kubernetes documents a default controller sync period of 15 seconds, configurable by the cluster operator. Even after a lower recommendation is calculated, the default downscale stabilization window is 300 seconds (five minutes): when scaling down, the autoscaler uses the highest recommendation recorded during that window. A configured behavior.scaleDown policy can further limit how quickly replicas are removed. Inspect the live HPA’s behavior instead of assuming cluster defaults apply. See Horizontal Pod Autoscaling.

The minimum or another metric keeps the recommendation high

The HPA cannot scale below minReplicas or above maxReplicas. If it uses multiple metrics, Kubernetes takes the largest replica recommendation among them. A low CPU-based recommendation alone therefore does not establish that the HPA should scale down; another configured metric may be calling for more replicas.

CPU utilization is calculated relative to requested CPU. If a relevant container lacks a CPU request, utilization for that Pod is undefined for the metric, and the autoscaler will not act on that metric. Check the actual HPA metrics and targets, not just a workload’s apparent CPU usage. The HPA documentation explains metric handling and scaling behavior.

A rolling update temporarily creates extra Pods

During a Deployment rolling update, old and new ReplicaSets can have Pods at the same time. The rollout strategy’s maxSurge allows the Deployment to create Pods above its desired count while replacing replicas. The documented default for RollingUpdate is 25% (rounded up for percentage values). The observed excess depends on rollout progress and termination; it does not by itself mean the HPA recommendation is wrong. Check the Deployment’s maxSurge, maxUnavailable, rollout status, and both ReplicaSets in the Deployment documentation.

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

Another system is writing the replica count

A manifest or automation that repeatedly applies spec.replicas can compete with the HPA. Kubernetes recommends removing that field from Deployment or StatefulSet manifests managed by an HPA; otherwise, declarative configuration may reset the count and cause replica changes or flapping. Check GitOps reconciliation, deployment pipelines, and manual scaling operations alongside HPA events. Follow the HPA migration guidance.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the discrepancy in order

  1. Run kubectl describe hpa <name>. Review current metrics and targets, minimum and maximum replicas, events, and conditions. AbleToScale indicates whether the HPA can fetch or update scale and whether backoff prevents scaling; ScalingActive indicates whether it can calculate desired scale; ScalingLimited indicates that a minimum or maximum bound capped the result. See the Kubernetes HPA walkthrough.

  2. Compare HPA currentReplicas and desiredReplicas with the target Deployment’s spec.replicas, .status.replicas, ready and updated counts, and .status.terminatingReplicas if supported. This establishes whether the mismatch is between the HPA recommendation and Deployment state, or merely between a dashboard’s Pod total and the Deployment’s non-terminating count.

  3. If a rollout is active, inspect the old and new ReplicaSets and the Deployment’s maxSurge and maxUnavailable. Determine whether the extra Pods are rollout surge or are still terminating.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Review every HPA metric and target, minReplicas, maxReplicas, behavior.scaleDown, and stabilization settings. A second metric or a recent higher recommendation can explain why scale-down has not reached the lower number.

  5. Check workload manifests and reconciliation tools for a competing spec.replicas value. For HPA-managed workloads, use Kubernetes’ guidance to remove that field from the manifest.

  6. If metrics or HPA conditions are unhealthy, verify that the relevant metrics API is available. Resource metrics commonly come from the separately installed Metrics Server; custom and external metrics use their respective aggregated APIs. The cluster’s metrics provider and adapter configuration determine what is available.

How to tell expected behavior from a problem

What you observe What to check
HPA recommendation is lower, but the HPA has recently recommended more replicas Downscale stabilization and scale-down policies; compare the live HPA behavior with the documented defaults.
One metric points down, but the HPA recommendation remains high Other configured metrics, their targets, and minReplicas.
Deployment replica count or visible Pods exceed the intended count during an update Old and new ReplicaSets, rollout progress, maxSurge, and terminating Pods.
Replica counts change back after scaling Applied manifests, GitOps or deployment automation, and manual scaling activity that may write spec.replicas.
HPA cannot calculate or apply a recommendation HPA conditions, events, metric availability, and the relevant metrics API or adapter.

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.

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

DeploymentsHorizontal Pod AutoscalerHPAKubernetesPodsTroubleshooting

Leave a Reply

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

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

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.