What is the Amazon Load Balancer Controller?
The Amazon Load Balancer Controller manages Amazon Elastic Load Balancers for a Kubernetes cluster. You can use the controller to expose your cluster apps to the internet. The controller provisions Amazon load balancers that point to cluster Service or Ingress resources. In other words, the controller creates a single IP address or DNS name that points to multiple pods in your cluster.
The controller watches for Kubernetes Ingress or Service resources. In response, it creates the appropriate Amazon Elastic Load Balancing resources. You can configure the specific behavior of the load balancers by applying annotations to the Kubernetes resources. For example, you can attach Amazon security groups to load balancers using annotations.
The controller provisions the following resources:
- Kubernetes
Ingress
-
The LBC creates an Amazon Application Load Balancer (ALB) when you create a Kubernetes
Ingress
. Review the annotations you can apply to an Ingress resource. - Kubernetes service of the
LoadBalancer
type -
The LBC creates an Amazon Network Load Balancer (NLB) when you create a Kubernetes service of type
LoadBalancer
. Review the annotations you can apply to a Service resource.In the past, the Kubernetes network load balancer was used for instance targets, but the LBC was used for IP targets. With the Amazon Load Balancer Controller version
2.3.0
or later, you can create NLBs using either target type. For more information about NLB target types, see Target type in the User Guide for Network Load Balancers.
The controller is an open-source
project
Before deploying the controller, we recommend that you review the prerequisites and considerations in Application load balancing on Amazon EKS and Network load balancing on Amazon EKS. In those topics, you will deploy a sample app that includes an Amazon load balancer.
Deploy the Controller 🚀
-
Learn how to Install the Amazon Load Balancer Controller using Helm. Use this procedure if you are new to Amazon EKS. This procedure uses Helm
, a package manager for Kubernetes, and eksctl
to simplify installing the LBC. -
Alternatively, Install the Amazon Load Balancer Controller add-on using Kubernetes Manifests. This procedure is appropriate for advanced cluster configurations. This includes clusters with restricted network access to public container registries.
Remove Deprecated Versions
-
If you have deprecated versions of the Amazon Load Balancer Controller installed, learn how to Migrate from Deprecated Controller.
-
Deprecated versions cannot be upgraded. They must be removed and a current version of the Amazon Load Balancer Controller installed.
-
Deprecated versions include:
-
Amazon ALB Ingress Controller for Kubernetes ("Ingress Controller"), a predecessor to the Amazon Load Balancer Controller.
-
Any
0.1.x
version of the Amazon Load Balancer Controller
-
Legacy Cloud Provider
Kubernetes includes a legacy cloud provider for Amazon. The legacy cloud provider is capable of provisioning Amazon load balancers, similar to the Amazon Load Balancer Controller. The legacy cloud provider creates Classic Load Balancers. If you do not install the Amazon Load Balancer Controller, Kubernetes will default to using the legacy cloud provider. You should install the Amazon Load Balancer Controller and avoid using the legacy cloud provider.
Important
In versions 2.5 and newer, the Amazon Load Balancer Controller becomes the default controller for Kubernetes
service resources with the type: LoadBalancer
and makes an Amazon Network Load Balancer (NLB) for each service. It does this by making a mutating
webhook for services, which sets the spec.loadBalancerClass
field to
service.k8s.aws/nlb
for new services of type:
LoadBalancer
. You can turn off this feature and revert to using the
legacy
Cloud ProviderenableServiceMutatorWebhook
to false
. The cluster
won't provision new Classic Load Balancers for your services unless you turn off this feature.
Existing Classic Load Balancers will continue to work.