Unable to get Kubernetes Node Metrics: http://:10255: getsockopt: connection refused

Some kubernetes action šŸ™‚

I’ve just installed prometheus-grafana monitoring on my kubeadm built k8s cluster. This is the repo i used to do such:


After installing, there was an error getting node metrics. The error:

Get dial tcp getsockopt: connection refused

To fix this, you need to allow kubelet read-only port by specifying a number other than 0 ( as per kuberetes io documentation

The process (NOTE: I”m using CentOS7 as Node)

  • Login to each node, and edit the file /etc/kubernetes/kubelet-config.yaml
  • Specify the port (in my case: 10255) in the following line: readOnlyPort: 10255
  • Save and restart the kubelet (systemctl restart kubelet)

Hope that helps!

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.