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
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
kubernetes โ error
# unable to compute new replica count for HPA: missing request metricunable 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
- Pod missing from some metric queries (new pods)
- Metric returns partial results (some pods missing)
- Pod metrics include pods not in Service selector
- Metric aggregation error (avg, sum, etc.)
- Resource request missing from pod spec
- Metric value is NaN or 0 for all pods
- 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
- ๐Kubernetes Official Documentation
- ๐Kubernetes Docs: Horizontal Pod Autoscaling(Official Docs)
- ๐Kubernetes Docs: Debugging Applications(Official Docs)
- ๐ฌStack Overflow: Kubernetes metrics server issues(Stack Overflow)