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:
https://github.com/giantswarm/prometheus
After installing, there was an error getting node metrics. The error:
Get http://172.16.20.14:10255/metrics: dial tcp 172.16.20.14:10255: 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!