Hi,
I am a little confused about external load balancers for a deployed service. For example if I have a deployment of 4 Pods across 4 Nodes and configure a service as LoadBalancer, an external IP is assigned to send traffic to the ‘service’ from outside the cluster. From what I understand, when the traffic hits the external IP, internally the traffic is sent to the internal ClusterIP which then ‘load distributes’ the session to a pod that is a member of the service. So this is ‘load distribution’ of sorts.
If internally whenever traffic hits the ExternalIP, its forwarded to the ClusterIP and the pod the traffic is sent to is based on a distribution algorithm, then I don’t see how an external load balancer (i.e. F5) would be of any use for a service in a single cluster if K8 will always choose the end pod the traffic is forwarded to. Am I missing something fairly fundamental here ?
Also, I note the same behavior if I set the service to NodePort, where when I send traffic from outside the cluster to the NodeIP:NodePort, the traffic does not necessarily terminate on that node if it has a running pod for that service, the same ‘load distribution’ happens and will terminate on a pod chosen by the K8 internal load distribution algorithm.
I am trying to understand where an external load balancer would have any real effect if regardless of if i send traffic to the NodeIP:NodePort or the ExternalIP:Port, the k8 internal load distribution will always choose a node. I can see an external LB having purpose if I have two separate deployments in a cluster or two separate deployment is separate clusters.
Any sanity around this is much appreciated.
Cluster information:
Kubernetes version: 1.20
Cloud being used: ACI
Installation method: kubeadm
Host OS: CentOS7
CNI and version: ACI 5.2
CRI and version:
Thanks,
Shaun