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 |
For anyone getting the error i figured it out, see article - https://computingforgeeks.com/fix-error-metrics-api-not-available-in-kubernetes/