How to specify network access between kubernetes master-node to worker-node

9/6/2019

Currently I have one VM for kubernetes master (k8s-server), second for worker node(node-server). I need to specify a rule how this 2 server communicate each other. Through which ports should k8s-server have access to node-server and vice versa?

-- George
kubernetes

1 Answer

9/6/2019

Strictly speaking Kubernetes makes use of the following ports, depending on your topology and configuration:

Kubelet
 - healthz, default tcp:10248
 - kubelet, default tcp:10250
 - readonly, default tcp:10255

Kube-proxy
 - healthz, default tcp:10256
 - metrics, default tcp:10249
 - proxy-port-range, default is randomly chosen tcp range

Api-server
 - secure-port, default tcp:6443
 - service-node-port-range, default tcp:30000-32767

Controller-manager
 - secure-port, default tcp:10257

Kube-scheduler
 - port, default tcp:10251
 - secure port, default tcp:10259

Cloud-controller-manager
 - secure port, default tcp:10258

Etcd
 - port, default tcp:2379-2380

However for your particular setup, I believe the following should suffice:

Master -> Kubelet
 - kubelet-port, default 10250
 - kubelet-readonly, default 10255
 - service-node-port-range, default 30000-32767


Kubelet -> Master
 - apiserver-secure-port, default 6443
 - etcd-port, default 2379
 - kubelet-port, default 10250

Hope this helps.

-- cewood
Source: StackOverflow