<p>I have a problem with ingress. It just doesn't work. How to understand and find 
what is wrong?</p>

<p>I have kubernetes bare metal.</p>

<p>Installed helm chart</p>

<pre><code>helm install stable/nginx-ingress --name ingress --namespace nginx-ingress
</code></pre>

<p>In the same namespace deployed ingress</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /test
        backend:
          serviceName: efk-kibana
          servicePort: 5601
</code></pre>

<p>Changed the ingress type of the service from LoadBalancer to NodePort because it was not created otherwise.</p>

<p>After installation</p>

<p><code>curl http://example.com – get an answer example page</code>.</p>

<p>Now all services work for me through NodePort, for example - myweb.com:31555.</p>

<p>In any tutorials does not write that i need to add something to / etc / hosts or something like that.</p>

<p>Thanks for the help.</p>

JDev
<p>If you're using a baremetal cluster, you're missing a piece of the puzzle.</p>

<p>Ingresses lie behind an ingress controller - you still need to expose that using a service with <code>Type=LoadBalancer</code> which isn't possible by default with a cloud provider.</p>

<p>There is however, a solution. <a href="https://metallb.universe.tf/" rel="nofollow noreferrer">MetalLB</a> is a provider which will allow you to specify IPs for services with type LoadBalancer.</p>

<p>If you deploy this with a <a href="https://metallb.universe.tf/configuration/#layer-2-configuration" rel="nofollow noreferrer">layer 2 configuration</a> and update your ingress controller deployment, it will work without needing NodePort.</p>
