HorizontalPodAutoscaler fails with the error "failed to get cpu utilization: unable to get metrics for resource cpu"

Solution Verified - Updated -

Issue

  • Unable to get HorizontalPodAutoscaler to autoscale the pods when the CPU limit is hit.
  • Metrics page for the pod shows the usage properly.
  • Accessing the DeploymentConfig>Configuration>Autoscaling, the Current usage shows as "Not Available".
  • HPA was unable to compute the replica count: unable to get metrics for resource cpu

Environment

  • Openshift Container Platform 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content