Creating an AWS Load Balancer
Last updated
Last updated
This guide shows you how to add an application load balancer in front of your Garden Enterprise Kubernetes Cluster in AWS.
We will outline the process in six steps with references to the official AWS documentation.
Step 1: Configure a load balancer and a listener.
Step 2: Configure security settings for an HTTPS listener. You'll need to configure the availability zones so that your new load balancer is in the same VPC as your EKS cluster and in a public subnet.
Step 3: Configure a security group. Here you'll need to apply the security group that your EKS worker nodes are using. This is necessary for the load balancer to be able to forward traffic to the worker nodes. Furthermore you'll need to add a security group for port 80
and port 443
so that they are open to accepting connections through the public internet.
Step 4: Configure a target group. When configuring the health checks on the target groups in this step please choose the success codes 200 - 404
. This is necessary because we also want the default backend which returns 404
to be recognized as healthy.
Step 5: Configure targets for the target group. Here you will need to select your worker nodes from your EKS cluster as the targets in the target group.
Step 6: Create the load balancer.
As an alternative to configuring the load balancer via AWS Console, you can also use terraform. This small snippet is an example on how to set up an application load balancer. Please keep in mind that you again need to pay attention to the security groups and health checks. You will need to replace all of the values starting with my-
with your own.
Please also check the documentation on the application load balancer terraform module.