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

  1. Step 1
  2. Step 2
  3. Step 3
  4. Step 4
  5. Step 5
kubernetes — error
# unable to get metrics: no metrics found for target
unable 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

  1. metrics-server pods crashed or not running
  2. metrics-server cannot scrape kubelet metrics
  3. kubelet not exposing metrics endpoint
  4. Network connectivity between metrics-server and nodes broken
  5. RBAC permissions missing for metrics-server
  6. Metrics freshness threshold exceeded (older than 1 minute)
  7. 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