The HPA was unable to compute the replica count: missing request for cpu on container
Issue
- After configuring the autoscaling for CPU (through
oc autoscale
command) the pods are not getting autoscaled - The
metrics-server
is installed and running but, even this way, theHPA
is not working in OCP 3.11 or OCP 4.x - The events of the
hpa
show:
ScalingActive False FailedGetResourceMetric the HPA was unable to compute the replica count: missing request for cpu on container <container> in pod <pod>
Environment
- Red Hat OpenShift Container Platform
- 3.11
- 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.