AWS Load Balancer Controller is a controller to help manage Elastic Load Balancers for a Kubernetes cluster.
- It satisfies Kubernetes Ingress resources by provisioning Application Load Balancers.
- It satisfies Kubernetes Service resources by provisioning Network Load Balancers.
- Kubernetes >=
1.22.0
- Kustomize >=
v3.5.3
- cert-manager
- AWS Load Balancer controller image:
registry.sighup.io/fury/amazon/aws-alb-ingress-controller
- AWS Load Balancer controller repo: AWS Load Balancer controller at Github
You can deploy AWS Load Balancer controller in your EKS cluster by including the package in your kustomize project:
kustomization.yaml
file extract:
...
resources:
- katalog/load-balancer-controller
...
Refer to the Terraform module iam-for-load-balancer-controller to create the IAM role and the required kustomize patches automatically.
If still you want to create everything manually without using our Terraform Module, you need then to patch the service account and the cluster name (for example mycluster
) as follows:
sa-patch.yaml
---
kind: ServiceAccount
metadata:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789123:role/your-role-name
name: aws-load-balancer-controller
namespace: kube-system
load-balancer-controller-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: aws-load-balancer-controller
name: aws-load-balancer-controller
namespace: kube-system
spec:
template:
spec:
containers:
- name: controller
env:
- name: CLUSTER_NAME
value: mycluster
and then add on the kustomization.yaml
file the patches:
kustomization.yaml
file extract:
...
patchesStrategicMerge:
- sa-patch.yaml
- load-balancer-controller-patch.yaml
...
You can then apply your kustomize project by running the following command:
kustomize build | kubectl apply -f -
For license details please see LICENSE