<p>I have the following topology in my kubernetes cluster:</p>
<p><a href="https://i.stack.imgur.com/qIb0x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qIb0x.png" alt="enter image description here" /></a></p>
<p>So, I have 2 Nodes: 1 Master and 1 Worker Node.</p>
<p><a href="https://i.stack.imgur.com/oBFNM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oBFNM.png" alt="enter image description here" /></a></p>
<p>Now I created an application with my deployment.yml and my service.yml, using nodePort configuration, see:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: administrativo-service
spec:
  type: NodePort
  selector:
    app: administrativo
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
</code></pre>
<p>And this is my service:</p>
<p><a href="https://i.stack.imgur.com/Ofu9Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ofu9Y.png" alt="enter image description here" /></a></p>
<p>Now I need to access this API using my DNS, something like: myapi.localdns, so I followed this steps to install Ingress Controller based on nginx:</p>
<ul>
<li><a href="https://kubernetes.github.io/ingress-nginx/deploy/#quick-start" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#quick-start</a></li>
<li><a href="https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal-clusters" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal-clusters</a></li>
</ul>
<p>After 1 hour this is POD status in ingress-nginx namespace:</p>
<p><a href="https://i.stack.imgur.com/B8QdC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B8QdC.png" alt="enter image description here" /></a></p>
<p>And finally, this is my Ingress yml:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: administrativo-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
    - host: myapi.localdns
      http:
        paths:
          - pathType: Prefix
            path: /
            backend:
              service:
                name: administrativo-service
                port:
                  number: 80
</code></pre>
<p>Well, my idea is to create an entry in my company to DNS to point to this DNS <strong>myapi.localdns</strong>:</p>
<p><a href="https://i.stack.imgur.com/y0r1f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y0r1f.png" alt="enter image description here" /></a></p>
<p>but to do it I need the Ingress Address, that don't show in my ingress resource, see:</p>
<p><a href="https://i.stack.imgur.com/PBoKQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PBoKQ.png" alt="enter image description here" /></a></p>

Ronaldo Lanhellas
<p>I solved the problem, using this steps:</p>
<ol>
<li>First create in my company DNS the CNAMEs pointing to my kubernetes workernode IP.</li>
<li>Reinstall ingress-nginx controller using bare-metal configuration: kubectl apply -f <a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.5/deploy/static/provider/baremetal/deploy.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.5/deploy/static/provider/baremetal/deploy.yaml</a>.</li>
<li>Change the deploy.yaml to use NodePort before use <code>kubectl apply</code></li>
<li>Use <code>externalIPS</code> to expose my service in port 80.</li>
</ol>
