Skip to content

aws-eks: aws-node-termination-handler Chart Version is Outdated #34217

Open
@wafuwafu13

Description

@wafuwafu13

Describe the bug

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

2.190.0

Expected Behavior

Successfully creates a cluster with spot setting at addAutoScalingGroupCapacity.

Current Behavior

Cluster creation fails with the following error.

14:44:57 | CREATE_FAILED        | Custom::AWSCDK-EKS-HelmChart          | Cluster/chart-spot...r/Resource/Default
Received response status [FAILED] from custom resource. Message returned: Error: b'Release "aygroundstackclusterchartspotinterrupthandlere670d248" does not exist. Installing it now.\nError: unable to build kubernetes objects from release manifest: resource mapp
ing not found for name: "aygroundstackclusterchartspotinterrupthandlere670d248-aws-node" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"\nensure CRDs are installed first\n'

Reproduction Steps

cdk deploy

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as eks from 'aws-cdk-lib/aws-eks';
import { KubectlV32Layer } from '@aws-cdk/lambda-layer-kubectl-v32';


export class AwsCdkPlaygroundStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);
    const mastersRole = new iam.Role(this, 'AdminRole', {
      assumedBy: new iam.AccountRootPrincipal(),
    });
    const secretsEncryptionKey = new kms.Key(this, 'SecretsKey');
    const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 3, natGateways: 1, restrictDefaultSecurityGroup: false });
    const vpcSubnets: ec2.SubnetSelection[] = [
      { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },
      { subnetType: ec2.SubnetType.PUBLIC },
    ];

    const cluster = new eks.Cluster(this, 'Cluster', {
      vpc,
      vpcSubnets,
      mastersRole,
      defaultCapacity: 2,
      version: eks.KubernetesVersion.V1_32,
      kubectlLayer: new KubectlV32Layer(this, 'kubectl'),
      secretsEncryptionKey,
      tags: {
        foo: 'bar',
      }
    });

    cluster.addAutoScalingGroupCapacity('spot', {
      spotPrice: '0.1094',
      instanceType: new ec2.InstanceType('t3.large'),
      maxCapacity: 10,
      bootstrapOptions: {
        kubeletExtraArgs: '--node-labels foo=bar,goo=far',
        awsApiRetryAttempts: 5,
      },
    });
  }
}

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.1003.0 (build b242c23)

Framework Version

No response

Node.js Version

v22.7.0

OS

Darwin c889f3a8faa8 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64

Language

TypeScript

Language Version

No response

Other information

This will be fixed by #34218

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions