×

The AWS Load Balancer (ALB) Operator deploys and manages an instance of the aws-load-balancer-controller. You can install the ALB Operator from the OperatorHub by using OKD web console or CLI.

AWS Load Balancer Operator considerations

Review the following limitations before installing and using the AWS Load Balancer Operator.

  • The IP traffic mode only works on AWS Elastic Kubernetes Service (EKS). The AWS Load Balancer Operator disables the IP traffic mode for the AWS Load Balancer Controller. As a result of disabling the IP traffic mode, the AWS Load Balancer Controller cannot use the pod readiness gate.

  • The AWS Load Balancer Operator adds command-line flags such as --disable-ingress-class-annotation and --disable-ingress-group-name-annotation to the AWS Load Balancer Controller. Therefore, the AWS Load Balancer Operator does not allow using the kubernetes.io/ingress.class and alb.ingress.kubernetes.io/group.name annotations in the Ingress resource.

AWS Load Balancer Operator

The AWS Load Balancer Operator can tag the public subnets if the kubernetes.io/role/elb tag is missing. Also, the AWS Load Balancer Operator detects the following from the underlying AWS cloud:

  • The ID of the virtual private cloud (VPC) on which the cluster hosting the Operator is deployed in.

  • Public and private subnets of the discovered VPC.

The AWS Load Balancer Operator supports the Kubernetes service resource of type LoadBalancer by using Network Load Balancer (NLB) with the instance target type only.

Procedure
  1. You can deploy the AWS Load Balancer Operator on demand from the OperatorHub, by creating a Subscription object:

    $ oc -n aws-load-balancer-operator get sub aws-load-balancer-operator --template='{{.status.installplan.name}}{{"\n"}}'
    Example output
    install-zlfbt
  2. Check the status of an install plan. The status of an install plan must be Complete:

    $ oc -n aws-load-balancer-operator get ip <install_plan_name> --template='{{.status.phase}}{{"\n"}}'
    Example output
    Complete
  3. Use the oc get command to view the Deployment status:

    $ oc get -n aws-load-balancer-operator deployment/aws-load-balancer-operator-controller-manager
    Example output
    NAME                                           READY     UP-TO-DATE   AVAILABLE   AGE
    aws-load-balancer-operator-controller-manager  1/1       1            1           23h

AWS Load Balancer Operator and AWS Outposts

AWS Load Balancer Operator can work with AWS Outposts. Application Load Balancer is supported. Network Load balancer is not, so AWS Load Balancer Operator does not provision it on AWS Outposts subnets. Ingress resources must be annotated with the either outposts or regular subnets (but not both).

Procedure
  • Configure the Ingress resource to use a specified subnet:

    Example Ingress resource configuration
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: echoserver
      annotations:
        alb.ingress.kubernetes.io/subnets: <outposts_subnet_id> (1)
    spec:
      ingressClassName: alb
      rules:
        - http:
            paths:
              - path: /
                pathType: Exact
                backend:
                  service:
                    name: echoserver
                    port:
                      number: 80
    1 Specifies the subnet to use. To use the Application Load Balancer in an Outpost, specify the Outpost subnet ID.

AWS Load Balancer Operator logs

Use the oc logs command to view the AWS Load Balancer Operator logs.

Procedure
  • View the logs of the AWS Load Balancer Operator:

    $ oc logs -n aws-load-balancer-operator deployment/aws-load-balancer-operator-controller-manager -c manager