I was wondering how does the ingress controller make sure that the incoming requests for the K8S cluster is load-balanced between all the K8S nodes. I know that with some other ingress controllers there is an external load balancer in front of the cluster that the ingress controller configures automatically. In some other cases the ingress controller achieves this by interacting with the router or with some other front-end that's in front of the K8S cluster.

I was wondering how does the NGINX Ingress-Controller (that, correct me if I'm wrong, works with a LoadBalancer service that includes a VIP) make sure the inbound traffic is load balanced between K8S nodes.

In my case, K8S cluster and thus NGINX ingress controller are deployed on-prem.


I was wondering how does the ingress controller make sure that the incoming requests for the K8S cluster is load-balanced between all the K8S nodes

It defaults to round_robin and uses Endpoints instead of sending traffic through the Service IP which would, itself, do round-robin across all Nodes (which would be wasteful by sending traffic to a Node in which a potential Pod was not running)

So in that way, it does not do what you said -- balancing between all the Nodes -- but for the cited reason, you wouldn't actually want that behavior, either.

As they mention in the fine manual, if you really need deterministic round-robin behavior, you'll need to tune it based on the behavior you want