Question

Cannot install heapster to cluster due to kubelets not allowing to get metrics on port 10255

Posted December 6, 2018 3.6k views
Kubernetes

We cannot install heapster to get better stats for our cluster, so we cannot use commands like kubectl top nodes for instance.

Heapster gives the following error:

Error in scraping containers from kubelet_summary:x.x.x.x:10255: Get http://x.x.x.x:10255/stats/summary/: dial tcp x.x.x.x:10255: getsockopt: connection refused

I think the kubelet has to have the –readonly-port=10255 option when starting it on the nodes.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

3 answers

Even tough heapster is deprecated, it’s currently the only metrics service which works with kubernetes-dashboard.

I’ve got it working with a helm installment using the https kubelet port 10250 instead of the readonly http port 10255 - which is deprecated and not available on DO too

helm upgrade --install --wait k8s-heapster stable/heapster --set=command='{/heapster,--source=kubernetes:https://kubernetes.default?kubeletHttps=true&kubeletPort=10250&insecure=true}' --namespace kube-system

Or, in yaml:

command:
  - /heapster
  - --source=kubernetes:https://kubernetes.default?kubeletHttps=true&kubeletPort=10250&insecure=true

you have to use –kubelet-insecure-tls and –kubelet-preferred-address-types=InternalIP for connection refused issue.

Submit an Answer