<p>I’ve build a bare-metal multi-node, multi-server Kubernetes cluster and this is my first experience.</p>

<ul>
<li><p>The cluster is built across many servers; each server contains a set of nodes.</p></li>
<li><p>The connection is done over public ip addresses on the LAN.</p></li>
<li><p>I run deployments on the cluster and <strong>it’s working</strong>. </p></li>
</ul>

<p>But I want to expose a service over the external network.</p>

<p>If I were using Minikube, I would use a LoadBalancer to expose the service externally.</p>

<p><strong>Troubleshooting:</strong> </p>

<ol>
<li>I am thinking about using an ingress-controller or a NodePort Service as a solution to access the pods-network.</li>
<li>I tried to expose a NodePort service, but I didn't get an external ip.</li>
</ol>

<p>I am asking if someone could help me set a running hello-world, but choosing the right architecture for this bare-metal cluster.</p>

<p>Thank you.</p>

Mohamed Zouari
<p>I suggest using <a href="https://metallb.universe.tf/installation/" rel="nofollow noreferrer">MetalLB</a> which is a LoadBalancer for bare metal clusters. </p>

<p>Also you could combine this with a bare metal Ingress controller like <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/static/provider/baremetal/deploy.yaml" rel="nofollow noreferrer">Nginx</a>.</p>

<p>Regarding Nginx you can find more details <a href="https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal" rel="nofollow noreferrer">here</a>.</p>

<p>I have successfully used this combination as well as with a wildcard domain (e.g *.mydomain) pointing to one of the cluster IPs. This allows to define as many combinations as you like to point to different services deployed on the cluster  (e.g. service1.mydomain, service2.mydomain, etc.).</p>

<p>What I would also suggest is installing <a href="https://helm.sh/docs/intro/install/" rel="nofollow noreferrer">Helm</a> as this would greatly help you with deployments. You can find a lot of charts for most of the widely spread services and it gives you the ability to configure them easily. Also it is quite a good practice to create charts for your future services as well for good maintenance and customization.</p>
