Horizontal Pod Autoscaler - failed to get CPU consumption and request: metrics obtained for X/Y of pods
Issue
Horizontal Pod Autoscaler (HPA) not working after pods being running for a while and errors similar to the ones below are seen in the monitoring tab or events log:
12d 1m 15563 {horizontal-pod-autoscaler } Warning FailedGetMetrics failed to get CPU consumption and request: metrics obtained for 1/2 of pods
12d 1m 15563 {horizontal-pod-autoscaler } Warning FailedComputeReplicas failed to get CPU utilization: failed to get CPU consumption and request: metrics obtained for 1/2 of pods
12d 9s 15863 {horizontal-pod-autoscaler } Warning FailedGetMetrics failed to get CPU consumption and request: metrics obtained for 0/2 of pods
12d 9s 15863 {horizontal-pod-autoscaler } Warning FailedComputeReplicas failed to get CPU utilization: failed to get CPU consumption and request: metrics obtained for 0/2 of pods
Environment
OpenShift Container Platform 3.X
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
