Read-only-port 10255 on Kubernetes node didn`t exist

8/9/2018

I have a problem, I need to collect metric data from read-only-port located on 10255, but unfortunately by using netstat I found that such port don't exists at all. Can somebody help with advise, how could I create such port on kubelet or how can I avoid this port for data collection?

-- volodjaklasik
kubernetes
metricbeat

1 Answer

8/9/2018

The kubelet requires a parameter to be set: --read-only-port=10255 (read more about kubelet)

If you are using kubeadm to bootstrap the cluster, you can use a config file to pass in for the kubelet (look for how to "Set Kubelet parameters via a config file")

If, for example, you are using kubespray, there's the kube_read_only_port variable (commented out by default).

Warning! This is not a good practice and the read-only-port is deprecated. There are ways to read from the secure port but this is another story.

-- Adi Fatol
Source: StackOverflow