Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm stable/nginx-ingress with autoscaling, HPA couldn't read CPU or memory metrics

I install the latest version (1.24.5) of stable/nginx-ingress with autoscaling: true on a GKE cluster.

After finish deploying, HPA said that unable to read all metrics.

enter image description here

Can you help me to debug and fix it? If there is any more detail/log do you need, please kindly ask and I will provide it!

Thank you

Update:

  • I can run other HPA perfectly
  • kubectl get hpa returns

    unknown/100m for CPU

    unknown/100Mi for RAM

like image 336
Quoc-Anh Nguyen Avatar asked Nov 04 '19 06:11

Quoc-Anh Nguyen


1 Answers

It seems that since the HPA that is created by enabling the autoscaler on the ingress controller, it will apply the HPA on the label app=nginx-ingress. The nginx-ingress default-backend also has the same label, and thus also requires us to define the CPU/memory resource requests/limits as well.

You can find more info in this GitHub issue

like image 132
Jackie Luc Avatar answered Sep 21 '22 13:09

Jackie Luc