<p>We have a OpenShift 4.8 cluster with 3 master nodes and 10 worker nodes in Azure. All the worker and master nodes are added under the same load balancer. I am a bit confused about how ingress traffic reaches the cluster. When someone accesses the DNS of their application, traffic comes through the load balancer over port 80/443 to any of the cluster nodes(including the master). But the ingress controller pods or running only on one or two nodes. How exactly traffic reaches to the correct ingress controller pods? Also once the traffic reaches the node how exactly it identifies the correct ingress host to forward traffic to?
Another question around this is, why both master and worker nodes are added under the same load balancer?</p>

Hound
<blockquote>
<p>How exactly traffic reaches to the correct ingress controller pods? Also once the traffic reaches the node how exactly it identifies the correct ingress host to forward traffic to?</p>
</blockquote>
<p>The ingress controller doesn't need to deploy on every compute node because it knows all the way to your pods which has a route.</p>
<p><strong>How to know which nodes are avaiable</strong></p>
<p>Load Balancer has a health check feature to check port or http request on a node. That helps to know available nodes the ingress pods work on.</p>
<p><strong>How to reach the ingress controller</strong></p>
<p>The ingress opens ports in the pod, not the node. OpenShift in a cloud provider like Azure deploys load balancer service for the ingress. That deploys Load balancer in Azure and binds ports on the node(host) to receive requests from outside OpenShift cluster. Those ports are defined randomly. The load balancer service makes setting up the load balancer in Azure to reach the ports on the nodes. So, you don't need to worry about which ports on nodes are opened.</p>
<p><strong>How to transfer requests to the correct pods</strong></p>
<p>The ingress controller consists of HAProxy which works as L7 proxy mode. A request to the ingress controller should have 'host name' and it should be matched a route you defined. That allows to lead your request to your correct pod.</p>
<blockquote>
<p>Another question around this is, why both master and worker nodes are added under the same load balancer?</p>
</blockquote>
<p>The ingress controller is a pod so if you don't specify 'Node Selector', the pod can be deployed any nodes in an OpenShift Cluster.
Since the pods could be deployed different node accidentally, Load Balancer is prepared for it.</p>
