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:
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/deploymentsRestore the required context from previous sections:
root@rok-tools:~/ops/deployments# source <(cat deploy/env.{envvars-aws,aws-vpc,eks-cluster,eks-alb-iam-alb})root@rok-tools:~/ops/deployments# export EKS_CLUSTER EKS_ALB_IAM_ALB_ROLE > AWS_DEFAULT_REGION AWS_VPC_IDRender the AWS Load Balancer Controller deployment patch template with the variables you have specified:
root@rok-tools:~/ops/deployments# j2 \ > rok/aws-load-balancer-controller/overlays/deploy/patches/deploy.yaml.j2 \ > -o rok/aws-load-balancer-controller/overlays/deploy/patches/deploy.yamlObtain the ARN of the IAM role for AWS Load Balancer Controller:
root@rok-tools:~/ops/deployments# export ROLE_ARN=$(aws iam get-role \ > --role-name ${EKS_ALB_IAM_ALB_ROLE?} \ > --query Role.Arn \ > --output text)Render the AWS Load Balancer Controller service account patch template with the variables you have specified:
root@rok-tools:~/ops/deployments# j2 \ > rok/aws-load-balancer-controller/overlays/deploy/patches/sa.yaml.j2 \ > -o rok/aws-load-balancer-controller/overlays/deploy/patches/sa.yamlCommit 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