How to implement metrics-server on LKE ?

Although, there's a tutorial video from Linode about implementing metrics-server on LKE, but it seems that the given helm command is already deprecated.

this video : https://www.youtube.com/watch?v=qUW1tsSXCkQ&list=PLTnRtjQN5ieYD97JCZtcGbIjq1EINih2G&index=8&t=601s

I found an article suggest to use this helm command instead :

helm upgrade --install metrics-server bitnami/metrics-server \
--create-namespace --namespace metrics-server \
--set apiService.create=true \
--set --extraArgs.kubelet-insecure-tls=true \
--set --extraArgs.kubelet-preferred-address-types=InternalIP

Finally, I was able to install metrics-server with the above command.
But when I typed : kubectl get apiservices
I always see this on screen:

v1beta1.metrics.k8s.io                 metrics-server/metrics-server   False (MissingEndpoints)   30m

I wonder if there's a way to fix this error ? or another way to install metrics-server on LKE ?

4 Replies

I've watched the same video you've shared and ran into the same issue:

v1beta1.metrics.k8s.io kube-system/metrics-server False (MissingEndpoints) 5s

I'm not an expert with Kubernetes, but I was able to find this thread where a user experienced the same issue and was able to resolve it. I ran this command, and it worked for me:

kubectl patch deployment metrics-server -n kube-system --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'

Once you've run that command, you can run kubectl get apiservices and should see this output instead:

v1beta1.metrics.k8s.io                 kube-system/metrics-server   True        2m37s

Hopefully, this helps!

None of the above-listed solutions worked for me…
@Jackk-Doe, please share if you found a solution

I had a similar issue standing up metrics-server using the bitnami chart. In my case, it looks like the service is not properly validating the TLS session for some reason. Ultimately I switched to using the upstream chart with an extra value: .Values.apiService.insecureSkipTLSVerify=true. It looks like you could probably accomplish the same thing with the bitnami chart though.

Using a values file like this:

$ cat values.yaml
apiService:
  create: true
  insecureSkipTLSVerify: true
args:
  - --kubelet-insecure-tls

helm upgrade --install metrics-server metrics-server/metrics-server --namespace kube-system -f values.yaml

Now, calling the metrics-server works, the apiService is available and I don't get the errors every kubectl command.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct