Commit fc46733
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
File tree
22 files changed
+131
-117
lines changed- packages
- @aws-cdk-testing/framework-integ
- test/aws-eks/test
- integ.eks-al2023-nodegroup.js.snapshot
- integ.fargate-cluster.js.snapshot
- aws-cdk-lib
- aws-eks
- lib
- test
22 files changed
+131
-117
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
| 758 | + | |
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| |||
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments