Skip to content

Commit fc46733

Browse files
authored
feat(eks): support eks with k8s 1.33 (#34602)
### Issue # (if applicable) Relates #34520 ### Reason for this change https://aws.amazon.com/about-aws/whats-new/2025/05/amazon-eks-distro-kubernetes-version-1-33/ ### Description of changes - As instructed by #33339 (comment) ### Describe any new or updated permissions being added ### Description of how you validated changes ```ts import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as iam from 'aws-cdk-lib/aws-iam'; import { App, Stack } from 'aws-cdk-lib'; import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33'; import * as eks from 'aws-cdk-lib/aws-eks'; import { Construct } from 'constructs'; export class EksClusterLatestVersion extends Stack { constructor(scope: Construct, id: string) { super(scope, id); const vpc = new ec2.Vpc(this, 'Vpc', { natGateways: 1 }); const mastersRole = new iam.Role(this, 'Role', { assumedBy: new iam.AccountRootPrincipal(), }); const cluster = new eks.Cluster(this, 'Cluster', { vpc, mastersRole, version: eks.KubernetesVersion.V1_33, kubectlLayer: new KubectlV33Layer(this, 'KubectlLayer'), defaultCapacity: 0, }); cluster.addNodegroupCapacity('MNG_AL2023_X86_64_STANDARD', { amiType: eks.NodegroupAmiType.AL2023_X86_64_STANDARD, }); } } const app = new App(); new EksClusterLatestVersion(app, 'v33-stack'); ``` ```console $ kubectl get no NAME STATUS ROLES AGE VERSION ip-10-0-156-223.ec2.internal Ready <none> 32m v1.33.0-eks-802817d ip-10-0-240-123.ec2.internal Ready <none> 32m v1.33.0-eks-802817d $ kubectl get po --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system aws-node-q96bx 2/2 Running 0 32m kube-system aws-node-smkp7 2/2 Running 0 32m kube-system coredns-5d849c4789-5wd79 1/1 Running 0 36m kube-system coredns-5d849c4789-rwklp 1/1 Running 0 36m kube-system kube-proxy-4nmx8 1/1 Running 0 32m kube-system kube-proxy-jg778 1/1 Running 0 32m ``` ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 79a3389 commit fc46733

22 files changed

+131
-117
lines changed

packages/@aws-cdk-testing/framework-integ/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@aws-cdk/lambda-layer-kubectl-v30": "^2.0.4",
4747
"@aws-cdk/lambda-layer-kubectl-v31": "^2.1.0",
4848
"@aws-cdk/lambda-layer-kubectl-v32": "^2.1.0",
49+
"@aws-cdk/lambda-layer-kubectl-v33": "^2.0.0",
4950
"aws-cdk-lib": "0.0.0",
5051
"cdk8s": "2.69.73",
5152
"cdk8s-plus-27": "2.9.5",

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ-tests-kubernetes-version.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29';
33
import { KubectlV30Layer } from '@aws-cdk/lambda-layer-kubectl-v30';
44
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';
55
import { KubectlV32Layer } from '@aws-cdk/lambda-layer-kubectl-v32';
6+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
67
import { Construct } from 'constructs';
78
import * as eks from 'aws-cdk-lib/aws-eks';
89

@@ -15,6 +16,7 @@ const versionMap: { [key: string]: new (scope: Construct, id: string) => lambda.
1516
'1.30': KubectlV30Layer,
1617
'1.31': KubectlV31Layer,
1718
'1.32': KubectlV32Layer,
19+
'1.33': KubectlV33Layer,
1820
};
1921

2022
export function getClusterVersionConfig(scope: Construct, version?: eks.KubernetesVersion) {

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.js.snapshot/asset.6094cb0ff874f89ab5ab24fb6b9417df0fdeb6966645f90c88ec1d7e28130112.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.js.snapshot/asset.e995b7fa13f3d9f946ff291512015444c90346ee68f0067f80037541a4b54d62.zip

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.js.snapshot/aws-cdk-eks-cluster-al2023-nodegroup-test.assets.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.js.snapshot/aws-cdk-eks-cluster-al2023-nodegroup-test.template.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,9 @@
434434
"S3Bucket": {
435435
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
436436
},
437-
"S3Key": "6094cb0ff874f89ab5ab24fb6b9417df0fdeb6966645f90c88ec1d7e28130112.zip"
437+
"S3Key": "e995b7fa13f3d9f946ff291512015444c90346ee68f0067f80037541a4b54d62.zip"
438438
},
439-
"Description": "/opt/kubectl/kubectl 1.32.3; /opt/helm/helm 3.17.2",
439+
"Description": "/opt/kubectl/kubectl 1.33.0; /opt/helm/helm 3.18.0",
440440
"LicenseInfo": "Apache-2.0"
441441
}
442442
},
@@ -755,7 +755,7 @@
755755
]
756756
},
757757
"Config": {
758-
"version": "1.32",
758+
"version": "1.33",
759759
"roleArn": {
760760
"Fn::GetAtt": [
761761
"ClusterRoleFA261979",

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.js.snapshot/tree.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-al2023-nodegroup.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class EksClusterStack extends Stack {
2727
vpc: this.vpc,
2828
mastersRole,
2929
defaultCapacity: 0,
30-
...getClusterVersionConfig(this, eks.KubernetesVersion.V1_32),
30+
...getClusterVersionConfig(this, eks.KubernetesVersion.V1_33),
3131
});
3232

3333
// create nodegroup with AL2023_X86_64_STANDARD
@@ -65,4 +65,3 @@ new integ.IntegTest(app, 'aws-cdk-eks-cluster-al2023-nodegroup', {
6565
// Test includes assets that are updated weekly. If not disabled, the upgrade PR will fail.
6666
diffAssets: false,
6767
});
68-
app.synth();

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.js.snapshot/asset.9953ad4c3e84d120643ece4b2e51caf43fd9850063641b4d78bf30fbe6b4d381.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.js.snapshot/asset.e995b7fa13f3d9f946ff291512015444c90346ee68f0067f80037541a4b54d62.zip

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)