How to fix unable to compute new replica count for HPA: missing request metric in Kubernetes

KubernetesINTERMEDIATEHIGHUpdated Dec 7, 2025ยท 106 views

HorizontalPodAutoscaler cannot calculate desired replica count due to missing metrics, invalid metric values, or computation errors. Scaling decisions fail.

Quick fix

Fixes unable to compute new replica count for HPA: missing request metric

  1. Step 1
  2. Step 2
  3. Step 3
  4. Step 4
  5. Step 5
kubernetes โ€” error
# unable to compute new replica count for HPA: missing request metric
unable to compute new replica count for HPA: missing request metric

What this error means

HPA performs a calculation: desiredReplicas = currentMetricValue / targetMetricValue * currentReplicas. When metric values are missing, NaN, or invalid, this calculation fails and HPA cannot determine the desired replica count. HPA will report status as "Unknown" and not change replica count.

Typical symptoms

  • HPA status shows "Unknown" for desired replicas
  • HPA events: "unable to compute new replica count"
  • Metrics show as "unknown" in kubectl describe hpa
  • Pod count does not change despite metric changes
  • Missing metric values in HPA calculation
  • Metric returns 0 or NaN for specific pods
  • Inconsistent metric data from some replicas

Common causes

  1. Pod missing from some metric queries (new pods)
  2. Metric returns partial results (some pods missing)
  3. Pod metrics include pods not in Service selector
  4. Metric aggregation error (avg, sum, etc.)
  5. Resource request missing from pod spec
  6. Metric value is NaN or 0 for all pods
  7. Custom metric not properly registered

How to fix "unable to compute new replica count for HPA: missing request metric"

1Step 1

First diagnostic step

2Step 2

Second diagnostic step

3Step 3

Third diagnostic step

4Step 4

Fourth diagnostic step

5Step 5

Fifth diagnostic step

Advanced notes

Additional notes and platform-specific considerations.

Frequently asked questions

What does "unable to compute new replica count for HPA: missing request metric" mean?
HPA performs a calculation: desiredReplicas = currentMetricValue / targetMetricValue * currentReplicas. When metric values are missing, NaN, or invalid, this calculation fails and HPA cannot determine the desired replica count. HPA will report status as "Unknown" and not change replica count.
How do I fix "unable to compute new replica count for HPA: missing request metric"?
HorizontalPodAutoscaler cannot calculate desired replica count due to missing metrics, invalid metric values, or computation errors. Scaling decisions fail.
What causes "unable to compute new replica count for HPA: missing request metric"?
Pod missing from some metric queries (new pods) Metric returns partial results (some pods missing) Pod metrics include pods not in Service selector
Is the "unable to compute new replica count for HPA: missing request metric" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading