<p>Apologies if this has been answered before, but I am a little confused on Ingress Nginx is working together with services.</p>

<p>I am trying to implement an nginx ingress in my Kubernetes environment.
So far I have an ingress-nginx-controller-deployment setup, as well as a deployment and service for the default backend. I still need to create my actual Ingress resources, the ingress-nginx-controller-service and also my backend.</p>

<p><code>curl &lt;NodeIP&gt;</code>
returns <code>"default backend 404"</code> on port 80 for the Node which the ingress-nginx-controller-deployment is deployed on.
However, my understanding is that exposing anything out of the cluster requires a service (Nodeport/Loadbalancer), which is the duty of the ingress-nginx-controller-service.</p>

<p>My question is how is this possible, that I can access port 80 for my Node on my browser, which is <em>outside</em> the cluster?
Could I then deploy my backend app on port 80 the same way the above is done?</p>

<p>I feel like I am misunderstanding a key concept here.</p>

<p>default backend image: <code>gcr.io/google_containers/defaultbackend:1.0</code></p>

<p>nginx-controller image: <code>gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.3</code></p>

xbfh0516
<p>I think you missed a <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/" rel="nofollow noreferrer">really good article</a> about how nginx-ingress expose to the world!</p>

<p>I short:
If you're using <code>hostNetwork: true</code> then you bypass the kubernetes network (kube-proxy). in a simple word, you bypass the container and orchestration network and just using the host network then the node with nginx-ingress container will expose port 80 to the world.</p>

<p>There are other ways that you can use to expose nginx port to outside of the cluster (node-port, network load balancer like MetalLB).</p>
