nginx Ingress is mainly used for path based routing and sub domain based routing to route the request to particular pod and Cloud provider load balancer will provide external ip address to get the requests from external world and which in turn points to ingress.
In Kubernetes, Service components acts as a real load balancer by balancing the load to multiple pods in the cluster. This is my understanding, Am I correct?
CodePudding user response:
Yes you are correct, so the flow goes like
You create the LB on any Cloud provider which gives you endpoint to the internet you can use it with ingress controller. (You can further use the SSL/TLS certificate also with LB to run HTTPS)
If you are using the Nginx ingress controller or any other controller depending on that it will handle or manage the Ingress resource in the cluster.
Once ingress rule decide service to forward traffic, K8s internal service load balance the traffic across running PODs for specific deployment based on rule.
internet > Loadbalancer > ingress > ingress controller checks > service > Loadbalance traffic across avilable POD of that specific service
Default load balancing will be round robbin.