kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
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 |
@NileshGule I am still getting the same error
Readiness probe failed: HTTP probe failed with statuscode: 500
Use this link to resolve https://stackoverflow.com/questions/71843068/metrics-server-is-currently-unable-to-handle-the-request
kubectl edit deployments.apps -n kube-system metrics-server
Resolved by editing the deployment yaml files and adding the hostNetwork: true after the dnsPolicy: ClusterFirst
save the file and wait for a min and then check the kubectl top no
you made it .
everything worked perfectly but when I proceeded with kubectl top nodes it showed the error: Metrics API not available
Normal Created 3m28s kubelet Created container metrics-server
Normal Started 3m28s kubelet Started container metrics-server
@NileshGule @WasimAhmad
Awesome, it works for me!
Thank you for these!
Thank you very VERY much for this!
Thanks so much for this! it works for me!
Hi, Can someone let me know the location of this file kubernetes-metrics-server.yaml
@NileshGule I've follow the exactly steps provided and I still got no lucky. Any ideas?
same for me @ghost
For anyone getting the error i figured it out, see article - https://computingforgeeks.com/fix-error-metrics-api-not-available-in-kubernetes/
download yaml file and add command session then apply
- 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