How to fix unable to get metrics: no metrics found for target in Kubernetes
KubernetesINTERMEDIATEHIGHUpdated Dec 6, 2025· 111 views
HorizontalPodAutoscaler cannot access metric data because metrics-server is not running, pod metrics are incomplete, or the metrics API is not responding.
Quick fix
Fixes unable to get metrics: no metrics found for target
- Step 1
- Step 2
- Step 3
- Step 4
- Step 5
kubernetes — error
# unable to get metrics: no metrics found for targetunable to get metrics: no metrics found for target
What this error means
HPA queries the metrics API to fetch metric values (CPU, memory, custom). When the metrics API is unavailable, unresponsive, or has no data for the target, HPA cannot make scaling decisions. This blocks autoscaling completely—HPA will keep the current replica count and report "Unknown" status.
Typical symptoms
- HPA status shows "unknown" for all metrics
- kubectl get hpa returns "unknown" for current/desired
- HPA events: "unable to get metrics for Deployment"
- Metrics API returns empty results
- kubectl top pods returns "error: metrics not available yet"
- metrics-server running but not collecting data
- HPA conditions show "false" for all types
Common causes
- metrics-server pods crashed or not running
- metrics-server cannot scrape kubelet metrics
- kubelet not exposing metrics endpoint
- Network connectivity between metrics-server and nodes broken
- RBAC permissions missing for metrics-server
- Metrics freshness threshold exceeded (older than 1 minute)
- Pod metrics not initialized (fresh pod or metrics delay)
How to fix "unable to get metrics: no metrics found for target"
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 get metrics: no metrics found for target" mean?
- HPA queries the metrics API to fetch metric values (CPU, memory, custom). When the metrics API is unavailable, unresponsive, or has no data for the target, HPA cannot make scaling decisions. This blocks autoscaling completely—HPA will keep the current replica count and report "Unknown" status.
- How do I fix "unable to get metrics: no metrics found for target"?
- HorizontalPodAutoscaler cannot access metric data because metrics-server is not running, pod metrics are incomplete, or the metrics API is not responding.
- What causes "unable to get metrics: no metrics found for target"?
- metrics-server pods crashed or not running metrics-server cannot scrape kubelet metrics kubelet not exposing metrics endpoint
- Is the "unable to get metrics: no metrics found for target" 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 API Reference(Official Docs)
- 📖Kubernetes Tasks: Run Applications(Official Docs)
- 💬Stack Overflow: Kubernetes hpa metrics not available(Stack Overflow)
- 🐙Kubernetes GitHub Issues(GitHub)