AWS Load Balancer Operator On ROSA
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
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 .
Compared with default AWS In Tree Provider, this controller is actively developed with advanced annotations for both ALB and NLB . Some advanced usecases are:
- Using native kubernetes ingress with ALB
- Integrate ALB with WAF
- Specify NLB source IP ranges
- Specify NLB internal IP address
AWS Load Balancer Operator is used to used to install, manage and configure an instance of aws-load-balancer-controller in a OpenShift cluster.
Prerequisites
- A multi AZ ROSA cluster deployed with STS
- AWS CLI
- OC CLI
Environment
Prepare the environment variables
AWS VPC / Subnets
Note: This section only applies to BYO VPC clusters, if you let ROSA create your VPCs you can skip to the following Installation section.
Set Variables describing your VPC and Subnets:
Tag VPC with the cluster name
Add tags to Public Subnets
Add tags to Private Subnets
Installation
Create Policy for the aws load balancer controller
Note: Policy is from AWS Load Balancer Controller Policy plus subnet create tags permission (required by the operator)
Create trust policy for ALB Operator
Create Role for ALB Operator
Create secret for ALB Operator
Install Red Hat AWS Load Balancer Operator
Install Red Hat AWS Load Balancer Controller
Note: If you get an error here wait a minute and try again, it likely means the Operator hasn’t completed installing yet.
Check the Operator and Controller pods are both running
You should see the following, if not wait a moment and retry.
Validate the deployment with Echo Server application
Deploy Echo Server Ingress with ALB
Curl the ALB ingress endpoint to verify the echoserver pod is accessible
Deploy Echo Server NLB Load Balancer
Test the NLB endpoint
Clean Up
Delete the Operator and the AWS Roles
If you wish to delete the policy you can run