EKS Load Balancer Best Pratices

12/23/2019

We are looking to switch over to Kubernetes for our deployment on AWS. One area of concern is setting up the load balancer for the frontend application.

It appears recommended to use the "LoadBalancer" type service in the cluster. However, I'm worried about this because there seems to be no way to specify the load balancer used, so any redeployment of the service would necessarily change DNS name used, resulting in downtime.

Is there a recommended practical way to stay on the same load balancer? Am I overthinking this, and this is acceptable for a generic SaaS appliation?

-- John Mark
amazon-web-services
kubernetes

1 Answer

12/23/2019

Well, the approach taken generically is this way --

Using nginx or Traefik (L7 load balancers), being static part of architecture ( rarely changed except for upgradations).

You can add ingress rules, which carry the binding of a DNS to a service ( say frontend service in your case is bound to www.example-dns.com), the frontend service will be having multiple Pods in backend where the traffic will be thrown.

Now there are multiple ways to do Loadbalancing at Pod level, horizontal Pod autoscaler can be used for each service individually.

The nginx and Traefik will appear under the EKS boundaries only.

-- Tushar Mahajan
Source: StackOverflow