executing the command kubectl get --raw /apis/metrics.k8s.io/v1beta1
it returned Error from server (ServiceUnavailable): the server is currently unable to handle the request
view the logs from metrics-server
http: TLS handshake error from 192.168.133.64:51926:EOF
kubelet version is 1.12.3
metrics-server 0.3.1
i have another clusters-set with the same version and configuration, metrics-server works just fine
part of metrics-server-deployment:
containers:
- name: metrics-server
image: k8s.gcr.io/metrics-server-amd64:v0.3.1
imagePullPolicy: Always
command:
- /metrics-server
- --kubelet-insecure-tls
volumeMounts:
- name: tmp-dir
mountPath: /tmp
Looks like it is failing because the hostname resolution happens through the internal DNS system which have pods/service entries but not cluster node entries.
Try running your metrics-server with following arguments:
- command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
It should work for you as well.
For more info you can look at the following issue here
Hope this helps.
Also worth pointing out that you should make sure metric-server
is running
kubectl get pods -n kube-system | grep metrics-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With