<p>i am new to the whole Kubernetes community and i am currently trying to get a dashboard exposed with Ingress-Nginx. I've tried several things but i am unnable to find a good explaination on how to expose the dashboard with Ingress. All i've got now is a Dashboard that is accessible through 'kubectl port-forward'. I also have Ingress-Nginx installed and the controller is running. How should i start to create an Ingress for the kubernetes dashboard?</p>

Lilin
<p>For a bare-metal environment like yours, Nginx-Ingress alone is not enough, because you are missing a load balancer which usually is automatically provided on public clouds like AWS, Google Cloud, etc.</p>
<p>To expose services through ingress resource in a bare metal environment, you have two options.</p>
<p><strong>NodePort</strong></p>
<p>A service with NodePort is exposed on every node of your Kubernetes cluster at a static port. To do this just edit your <code>kubernetes-dashboard</code> service (be aware that naming could change depending on how you installed Kubernetes dashboard):</p>
<pre><code>kubectl -n kubernetes-dashboard edit service kubernetes-dashboard
</code></pre>
<p>and change <code>type: ClusterIP</code> to <code>type: NodePort</code>. After doing this, check again your service:</p>
<pre><code>kubectl -n kubernetes-dashboard get svc kubernetes-dashboard

NAME                   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
kubernetes-dashboard   NodePort   10.43.120.193   &lt;none&gt;        443:31120/TCP   9m7s
</code></pre>
<p>If you look at PORT(S) output, you will see that a random port was exposed (in my example 31120). To access your dashboard now you only need to use:</p>
<p><code>https://node-ip:31120</code></p>
<p><strong>MetalLB</strong></p>
<p>This is a much cooler solution, because it will allow you to use services of type LoadBalancer, like if you were on a public cloud provider. This requires some basic network knowledge, but it's very easy to use and very flexible for testing environments. You can find more information on <a href="https://metallb.universe.tf/" rel="nofollow noreferrer">MetalLB</a> website.</p>
<p>Here also couple of useful links to understand better the concepts I explained above.</p>
<p><a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/" rel="nofollow noreferrer">Nginx-Ingress - Bare-metal considerations</a></p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Kubernetes Services</a></p>
