Deploy AWS Load Balancer Controller¶
In this section you will configure and deploy AWS Load Balancer Controller using an IAM role to provide it with permissions to manage AWS resources on your behalf.
Fast Forward
If you have already deployed AWS Load Balancer Controller, expand this box to fast-forward.
- Proceed to the Verify section.
See also
Choose one of the following options to deploy AWS Load Balancer Controller:
- Option 1: Deploy AWS Load Balancer Controller Automatically (preferred).
- Option 2: Deploy AWS Load Balancer Controller Manually.
Overview
What You'll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing EKS cluster.
- An existing IAM role for AWS Load Balancer Controller.
Option 1: Deploy AWS Load Balancer Controller Automatically (preferred)¶
Deploy AWS Load Balancer Controller by following the on-screen instructions on
the rok-deploy
user interface.
If rok-deploy
is not already running, start it with:
root@rok-tools:~# rok-deploy --run-from eks-alb-alb
Proceed to the Summary section.
Option 2: Deploy AWS Load Balancer Controller Manually¶
If you want to deploy AWS Load Balancer Controller manually, follow the instructions below.
Procedure¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deployments
Restore the required context from previous sections:
root@rok-tools:~/ops/deployments# source <(cat deploy/env.{eks-cluster,eks-alb-iam-alb})
root@rok-tools:~/ops/deployments# export EKS_CLUSTER EKS_ALB_IAM_ALB_ROLE
Verify that the IAM role for AWS Load Balancer Controller exists, obtain its ARN and copy it to your clipboard, as you are going to use this value in later steps:
root@rok-tools:~/ops/deployments# aws iam get-role \ > --role-name ${EKS_ALB_IAM_ALB_ROLE?} \ > --query Role.Arn \ > --output text arn:aws:iam::123456789012:role/rok-us-west-2-arrikto-cluster-alb
Edit
rok/aws-load-balancer-controller/overlays/deploy/patches/deploy.yaml
and set--cluster-name
to that of your EKS cluster:value: "--cluster-name=arrikto-cluster" # <-- Update this line with your EKS_CLUSTER
Edit
rok/aws-load-balancer-controller/overlays/deploy/patches/sa.yaml
and set the IAM-role-related annotation to the ARN of your IAM role for AWS Load Balancer Controller:annotations: eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/rok-us-west-2-arrikto-cluster-alb # <-- Update this line with the ARN
Commit your changes:
root@rok-tools:~/ops/deployments# git commit -am "Deploy AWS Load Balancer Controller"
Deploy AWS Load Balancer Controller:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/aws-load-balancer-controller/overlays/deploy