<p>I am running a Kubernetes 1.8 on Azure AKS. I have docker images deployed to a pod. I have created a Azure public ip(static) which I give to the NGinx ingress-controller when I create it. Kubectl get ingress shows that the ip has been assigned to it and /healthz endpoint returns 200 OK.</p>

<p>kubectl describe ingress shows:</p>

<pre><code>   Rules:   
Host                             Path    Backends   
service1.default.example.com     /       service1:80 (&lt;none&gt;)
</code></pre>

<p>When I request the host I get a 502 bad gateway. If I use ip, I get 404 not found. Same ip, which returns 200 ok from /healthz.</p>

<p>Containers and setup in general has been tested in Minikube and is working. </p>

<p>What could be the problem that my containers are not exposed through the ingress? Describes looks the same when compared to the Minikube's.</p>

<p>What's happening is that the wiring between the ingress and the service your pods back is not correct. The logs from the ingress pod will probably help. There could be a few specific things wrong.</p>

<p>The reason that requesting the IP directly gives a response is that the IP does not match an ingress -> service rule, so you are just getting the default back end for the ingress- which gives you the 404. </p>

<p>So the ingress is fine. And the service and pods themselves are probably fine. But something is wrong with the wiring between the ingress and the service.</p>
