kubernetesload-balancingnginx-ingressamazon-eksamazon-elb

Service-to-Service Communication in Kubernetes


I have deployed my Kubernetes cluster on EKS. I have an ingress-nginx which is exposed via load balancer to route traffic to different services. In ingress-nginx first request goes to auth service for authentication and if it is a valid request then I allow it move forward. Let say the request is in Service 1 and now from there, it wants to communicate to Service 2. So if I somehow want my request to go directly to ingress not via load balancer and then from ingress to service 2.

  1. Is is possible to do so?
  2. Will it help in improving performance as I bypassed load balancer?
  3. As the request is not moving through load balancer so load balancing won't take place, is it a serious concern?

Solution

  • I was fairly new when I asked this.

    But the answer to this is that you can expose your private ingress controller using both Cluster IP and Load Balancer.

    So, any communication from outside of your Kubernetes cluster can come via the load balancer, and internal communication can be done via Cluster IP. However, to access the private ingress load balancer, you need to allow traffic to it by whitelisting IPs.

    It's worth noting that Cluster IP does have load balancing capabilities. While it might not be as robust as a dedicated load balancer, I found that it provided better performance for my use case.