Kubernetes Autoscaling - Installation Metric Server Lab broken

In the lab (Kubernetes Autoscaling Course | KodeKloud) the metrics server is intended to fail. Yet the current solution of allowing insecure connections won’t be enough to fix the metrics server.

Fix “error: Metrics API not available” in Kubernetes | by CloudSpinx Global | Medium has a good write-up of the fix. Please update the lab to fix the issue.

I see it. I will investigate it further and raise an internal ticket if necessary.

Hi @Rein

I have re-checked the lab, and addition of --kubelet-insecure-tls to the argument list is sufficient to get the pod to start and therefore for kubectl top commands to work

It was not necessary to change the port to 4443 nor to set the pod to host networking mode.

Hmm, seems to have been a layer-8 issue at my end. I followed the steps in the lab again and this time around it worked perfectly after being patient for half a minute. Not sure what I did wrong earlier. Sorry for taking up your time.

Half a minute is about right. You need to wait until the pod is fully restarted and in running state before top commands will work.