Metrics API not available Kubernetes Origin: Platform & cloud Last updated 13 Oct 2026

error: Metrics API not available / HPA: unable to get metrics for resource cpu

metrics-server isn’t installed or isn’t working, so kubectl top and CPU/memory HorizontalPodAutoscalers have no data.

Exact message you may see Metrics API not availableunable to get metrics for resource cpufailed to get cpu utilization
Seen on: Kubernetes

Meaning

kubectl top and resource-based HPAs read the metrics.k8s.io API served by metrics-server. HPAs then show <unknown>/50% and FailedGetResourceMetric. On kind/minikube/self-signed kubelets, metrics-server often needs --kubelet-insecure-tls; pods also need CPU requests for percentage targets.

Common causes

  • metrics-server not installed
  • metrics-server can’t scrape kubelets (TLS/self-signed certs)
  • APIService v1beta1.metrics.k8s.io unavailable
  • Pods without CPU requests (HPA percentage can’t be computed)

⚡ Quick fix

  1. Install metrics-server
  2. Check kubectl get apiservice v1beta1.metrics.k8s.io
  3. Set resources.requests.cpu on the pods

Detailed fix by platform

Kubernetes

  1. bash
    kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
    kubectl -n kube-system logs deploy/metrics-server | tail
    kubectl get apiservice v1beta1.metrics.k8s.io

How to diagnose

  1. Server — metrics-server pod running?
  2. APIService — Available True?
  3. Requests — CPU requests set?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

admission webhook denied the request — Error from server: admission webhook "validate.nginx.ingress.kubernetes.io" denied the request (Kubernetes)admission webhook den…CrashLoopBackOff — Kubernetes: CrashLoopBackOff (Kubernetes)CrashLoopBackOffCreateContainerConfigError — Kubernetes: CreateContainerConfigError — secret / configmap not found (Kubernetes)CreateContainerConfig…CreateContainerError — Pod status CreateContainerError (Kubernetes)CreateContainerErroris waiting to start — Error from server (BadRequest): container "x" in pod "y" is waiting to start: ContainerCreating (Kubernetes)is waiting to startmust specify limits — pods is forbidden: failed quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory (Kubernetes)must specify limitsnamespace Terminating — Namespace stuck in Terminating (Kubernetes)namespace TerminatingMetrics A…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.