Skip to content

(aws-eks): AlbController fixed Helm Chart version causing issues #20764

@adriantaut

Description

@adriantaut

Describe the bug

Hello CDK team! 👋

Until now managed the ALB Controller by ourselves, but now started experimented using the albController with the following:

  • AlbControllerVersion.V2_4_1

Everything works fine for k8s version 1.22, but all our EKS Clusters with lower version are failing with

Failed to create Ingress 'prod/htd-ingress' because: Internal error occurred: failed calling webhook "vingress.elbv2.k8s.aws": the server could not find the requested resource

After some diggings it proved to be because of the 1.2.7 Helm Chart version pinned in the alb-controller. As the comment says, although the Helm Chart is an implementation detail, it proves not to be the case.

I've changed the compiled JS code to version 1.4.1 (which was released together with the AlbControllerVersion.V2_4_1 docker image) and everything works as expected again. Did not dig into all the Helm Chart details, but there are definitely some resources missing in the 1.2.7 version that make the ALBC incompatible with the k8s versions lower than 1.22.

Expected Behavior

ALBC allowing the ingress deployments.

Current Behavior

Failing with the above error.

Reproduction Steps

    const cluster = new Cluster(this, 'Cluster', {
      clusterName: this.clusterName,
      version: KubernetesVersion.of(props.version ?? '1.19'),
      defaultCapacity: AVOID_INITIAL_CAPACITY_ALLOCATION,
      vpcSubnets: [{ subnetType: SubnetType.PRIVATE_WITH_NAT }], // this will look for subnets with tag `aws-cdk:subnet-type=Private`
      endpointAccess: EndpointAccess.PRIVATE, // no access outside of your VPC,
      vpc,
      mastersRole,
      securityGroup: controlPlaneSG,
      albController: props.albController ?? DEFAULT_ALB_CONTROLLER,
    });

Possible Solution

Possible solutions:

  1. Update the version to latest available
  2. Expose the ALBC Chart version in the AlbControllerOptions interface.

FYI: I can raise a PR once we agree on the solution.

Additional Information/Context

No response

CDK CLI Version

2.27.0

Framework Version

No response

Node.js Version

v17.6.0

OS

MacOS

Language

Typescript

Language Version

4.5.5

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions