<p>I have a typhoon kubernetes cluster on aws with an nginx ingress controller installed.</p>
<p>If I add an test ingress object it looks like this:</p>
<pre><code>NAMESPACE   NAME   CLASS    HOSTS                ADDRESS      PORTS   AGE
default     foo    &lt;none&gt;   *                    10.0.8.180   80      143m
</code></pre>
<p><strong>Question: Where does my ingress controller get that address(10.0.8.180) from?</strong></p>
<p>There is no (loadbalancer) service on the system with that address.
(Because it is a private address external-dns does not work correctly.)</p>

<p>In order to answer your first question:</p>
<blockquote>
<p>Where does a kubernetes ingress gets its IP address from?</p>
</blockquote>
<p>we have to dig a bit into the code and its behavior.</p>
<p>It all starts <a href="https://github.com/kubernetes/ingress-nginx/blob/47b5e20a88e9b2f6c0356090ac15fa192b3825ba/cmd/nginx/flags.go#L68" rel="nofollow noreferrer">here</a> with <code>publish-service</code> flag:</p>
<pre><code>publishSvc = flags.String(&quot;publish-service&quot;, &quot;&quot;, 
`Service fronting the Ingress controller 
Takes the form &quot;namespace/name&quot;. When used together with update-status, the
controller mirrors the address of this service's endpoints to the load-balancer
status of all Ingress objects it satisfies.`)
</code></pre>
<p>The flag variable (publishSvc) is later <a href="https://github.com/kubernetes/ingress-nginx/blob/47b5e20a88e9b2f6c0356090ac15fa192b3825ba/cmd/nginx/flags.go#L282" rel="nofollow noreferrer">assigned</a> to other variable (PublishService):</p>
<pre><code>PublishService: *publishSvc,
</code></pre>
<p>Later in the code you can find that if this flag is set, <a href="https://github.com/kubernetes/ingress-nginx/blob/3eafaa35a171e2d91d75690461ef45e721411aec/internal/ingress/status/status.go#L179-L181" rel="nofollow noreferrer">this code</a> is being run:</p>
<pre><code>if s.PublishService != &quot;&quot; {
return statusAddressFromService(s.PublishService, s.Client)
}
</code></pre>
<p><a href="https://github.com/kubernetes/ingress-nginx/blob/3eafaa35a171e2d91d75690461ef45e721411aec/internal/ingress/status/status.go#L329-L365" rel="nofollow noreferrer"><code>statusAddressFromService</code> function</a> as an argument takes value of <code>publish-service</code> flag and queries kubernetes for service with this name, and returns IP address of related service.</p>
<p>If this <a href="https://github.com/kubernetes/ingress-nginx/blob/3eafaa35a171e2d91d75690461ef45e721411aec/internal/ingress/status/status.go#L183-L204" rel="nofollow noreferrer">flag is not set</a> it will query the k8s for IP address of a node where nginx ingress pod is running.  This is the bahaviour you are experiencing and it makes me think that you didn't set this flag. This also answers your second question:</p>
<blockquote>
<p>Why does it take the address of the node instead of the NLB?</p>
</blockquote>
<p>Meanwhile you can find all yaml for all sort of platforms in <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">k8s nginx ingress documentation</a>.</p>
<p>Lets have a look at <a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/aws/deploy.yaml" rel="nofollow noreferrer">AWS ingress yaml</a>.
Notice here that <code>publish-service</code> has a value called <code>ingress-nginx/ingress-nginx-controller</code> (&lt;namespace&gt;/&lt;service&gt;).
and this is what you also want to do.</p>
<hr />
<p><strong>TLDR:</strong> All you have to do is to create a LoadBalancer Service and set the <code>publish-service</code> to &lt;namespace_name&gt;/&lt;service_name&gt;</p>
