Skip to content

Instantly share code, notes, and snippets.

@NileshGule
Last active October 2, 2024 21:21
Show Gist options
  • Save NileshGule/8f772cf04ea6ae9c76d3f3e9186165c2 to your computer and use it in GitHub Desktop.
Save NileshGule/8f772cf04ea6ae9c76d3f3e9186165c2 to your computer and use it in GitHub Desktop.
gist to update kuberentes metrics server deployment

deploy metrics server


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

edit metrics server deployment by adding command


k -n kube-system edit deploy metrics-server

containers:
- args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s
command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
@irtazakhalid24
Copy link

Hi, Can someone let me know the location of this file kubernetes-metrics-server.yaml

@tbernacchi
Copy link

@tbernacchi
Copy link

@NileshGule I've follow the exactly steps provided and I still got no lucky. Any ideas?

@tbernacchi
Copy link

same for me @ghost

@jmutai
Copy link

jmutai commented Aug 2, 2024

For anyone getting the error i figured it out, see article - https://computingforgeeks.com/fix-error-metrics-api-not-available-in-kubernetes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment