<p>I have a K8s cluster, that I would like to publish to the internet. What is the best practice to publish K8s to internet?</p>

<p>The K8s is installed on 3 VPS server and it is in the private network. </p>

<p>I have the following idea: </p>

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

<p>With the proxy. Requests will pass through proxy and will be forwarded to K8s.
<a href="https://i.stack.imgur.com/MvVEa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MvVEa.png" alt="enter image description here"></a></p>

<p>Or directly to K8s.</p>

softshipper
<p>One way is "OpenShift router" style - you have one (or more) node which has public IP and join it to K8s cluster with some distinct label on it. Then you launch ingress controller like Nginx on this node using NodeSelector and hostNetwork=true. In this scheme Nginx ingress will be available on Internet and is able to publish your services.</p>

<p>Another way is to have the same proxy node with public IP (without joining to K8s) and make it load balance requests to all K8s nodes. You can then publish your services using NodePort and configure proxy for each service. Or you can launch Nginx ingress as NodePort in K8s and forward requests from proxy node to Nginx ingress NodePort. </p>

<p>I would prefer first option because it is simpler to configure.  </p>
