<p>Suppose I want to create a k8s cluster on bare metal servers, with 1 master and 2 nodes. What ports do I have to open in my firewall so that the master and nodes can communicate over the Internet? (I know I can just use VPN, but I just want to know which ports I need). I guess I need at least the following ports. Do I need more? How about if I'm using Flannel or Calico? I want to create a <em>comprehensive</em> list of all possible k8s services and needed ports. Thank you.</p>

<p>kubectl - 8080</p>

<p>ui - 80 or 443 or 9090</p>

<p>etcd - 2379, 2380</p>

<p>the ports for kubernetes are the following:</p>

<p><a href="https://i.stack.imgur.com/GY4ae.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GY4ae.png" alt="enter image description here"></a></p>

<p>from the CoreOS <a href="https://coreos.com/kubernetes/docs/latest/kubernetes-networking.html" rel="noreferrer">docs</a>.</p>
