Question

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

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.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

i got this working by installing metrics-server (https://github.com/kubernetes-sigs/metrics-server) and modified the /metrics-server/deploy/kubernetes/metrics-server-deployment.yaml by adding the following to command to look like this:

command: - /metrics-server - --kubelet-insecure-tls - --secure-port=4443 (port number depends on your case) - --metric-resolution=10s - --kubelet-preferred-address-types=InternalIP

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

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