KubeHpaMetricsUnavailable
A HorizontalPodAutoscaler cannot get the metrics it scales on, so it has stopped making scaling decisions.
| Severity | warning |
| Source | kube-state-metrics v2.x (autoscaling/v2) |
| Key metric | kube_horizontalpodautoscaler_status_condition (condition="ScalingActive", status="false") |
What it means
The HPA’s ScalingActive condition turns False when it cannot compute a replica count, most often because a metric query failed. When that lasts for a sustained period, this alert fires. Reasons you will see include FailedGetResourceMetric, FailedGetPodsMetric, FailedGetObjectMetric and FailedGetExternalMetric. ScalingDisabled means the target was scaled to zero by hand.
The workload is frozen at its current size. It will not grow under load or shrink when idle.
Common causes
- metrics-server is down, not ready, or cannot scrape kubelets (TLS or network issues).
- Containers have no CPU or memory
requests, so utilization cannot be computed. - prometheus-adapter or KEDA is down, or its rule no longer matches the series name after a relabel.
- The custom or external metric has no data (the exporter stopped, the label selector is wrong).
- New pods not yet reporting metrics during a large rollout.
First checks
- Read the condition reason and message:
kubectl -n <ns> describe hpa <hpa> - Check the metrics APIs are registered and available:
kubectl get apiservices | grep -E 'metrics.k8s.io|custom.metrics|external.metrics' - For resource metrics, test metrics-server directly:
kubectl -n <ns> top pods kubectl -n kube-system logs deploy/metrics-server --tail=50 - Confirm every container in the target has requests for the metric’s resource:
kubectl -n <ns> get deploy <name> -o jsonpath='{range .spec.template.spec.containers[*]}{.name}: {.resources.requests}{"\n"}{end}' - For custom metrics, query the adapter and check the backing series exists in Prometheus:
kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/<ns>/pods/*/<metric>"
Fixing it
Restore the metrics source: restart or fix metrics-server (commonly its --kubelet-preferred-address-types or kubelet TLS settings), or fix the adapter’s rules. Add missing requests to every container, including sidecars. Scaling resumes on the next HPA sync once metrics return.
Related alerts
- KubeHpaUnableToScale: the other condition that stops autoscaling.
- KubeHpaMaxedOut: a bad metric can also pin an HPA at max.
- KubeAggregatedAPIDown: the metrics APIs are aggregated APIs.