Welcome to the Linux Foundation Forum!

Lab 4.5. Setting Pod Resource Limits and Requirements: Cannot get Metrics Server to Work



I did not have metrics server installed for lab 4.5, so I went to install it with this command:

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

This command finished without issue. However, when I run kubectl top nodes or kubectl top pods, I am getting this error and I cant find a way to get around it:

Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)

When I run kubectl get deployment metrics-server -n kube-system I see this:


and when I run kubectl describe pods metrics-server -n kube-system is see that the readiness probe failed:


I tried the solution here: https://stackoverflow.com/questions/62138734/metric-server-not-working-unable-to-handle-the-request-get-nodes-metrics-k8s but that did not fix the problem. It spun up a second metrics-server deployment that is now failing with a CrashLoopBack off:

Any thoughts or solutions? Thanks :smile:


Upcoming Training