You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(eks-v2-alpha): support eks with k8s 1.32 (#33344)
### Issue # (if applicable)
Closes #<issue number here>.
### Reason for this change
### Description of changes
### 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, StackProps } from 'aws-cdk-lib';
import { KubectlV32Layer } from '@aws-cdk/lambda-layer-kubectl-v32';
import * as eks from '../lib';
import { Construct } from 'constructs';
export class EksClusterLatestVersion extends Stack {
constructor(scope: Construct, id: string, props: StackProps) {
super(scope, id, props);
const vpc = new ec2.Vpc(this, 'Vpc', { natGateways: 1 });
const mastersRole = new iam.Role(this, 'Role', {
assumedBy: new iam.AccountRootPrincipal(),
});
new eks.Cluster(this, 'hello-eks', {
vpc,
mastersRole,
version: eks.KubernetesVersion.V1_32,
kubectlProviderOptions: {
kubectlLayer: new KubectlV32Layer(this, 'kubectl'),
},
});
}
}
const app = new App();
new EksClusterLatestVersion(app, 'v32-stack', {
env: {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION,
},
});
app.synth();
```
verify:
```
% kubectl get no
NAME STATUS ROLES AGE VERSION
ip-172-31-1-32.ec2.internal Ready <none> 10m v1.32.0-eks-aeac579
ip-172-31-2-70.ec2.internal Ready <none> 10m v1.32.0-eks-aeac579
pahud@MBP @aws-cdk % kubectl get po -n kube-system
NAME READY STATUS RESTARTS AGE
aws-node-6lp5b 2/2 Running 2 (8m33s ago) 11m
aws-node-tckj8 2/2 Running 2 (8m47s ago) 11m
coredns-6b9575c64c-pntcb 1/1 Running 1 (8m33s ago) 15m
coredns-6b9575c64c-zsqw8 1/1 Running 1 (8m33s ago) 15m
kube-proxy-q7744 1/1 Running 1 (8m32s ago) 11m
kube-proxy-tfrmc 1/1 Running 1 (8m47s ago) 11m
```
### 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*
Amazon EKS managed node groups automate the provisioning and lifecycle management of nodes (Amazon EC2 instances) for Amazon EKS Kubernetes clusters.
106
-
With Amazon EKS managed node groups, you don’t need to separately provision or register the Amazon EC2 instances that provide compute capacity to run your Kubernetes applications. You can create, update, or terminate nodes for your cluster with a single operation. Nodes run using the latest Amazon EKS optimized AMIs in your AWS account while node updates and terminations gracefully drain nodes to ensure that your applications stay available.
106
+
With Amazon EKS managed node groups, you don't need to separately provision or register the Amazon EC2 instances that provide compute capacity to run your Kubernetes applications. You can create, update, or terminate nodes for your cluster with a single operation. Nodes run using the latest Amazon EKS optimized AMIs in your AWS account while node updates and terminations gracefully drain nodes to ensure that your applications stay available.
107
107
108
108
> For more details visit [Amazon EKS Managed Node Groups](https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html).
109
109
@@ -115,7 +115,7 @@ At cluster instantiation time, you can customize the number of instances and the
@@ -317,7 +317,7 @@ new eks.Cluster(this, 'hello-eks', {
317
317
If you want to use an existing kubectl provider function, for example with tight trusted entities on your IAM Roles - you can import the existing provider and then use the imported provider when importing the cluster:
You can configure the environment of this function by specifying it at cluster instantiation. For example, this can be useful in order to configure an http proxy:
By default, the kubectl provider is configured with 1024MiB of memory. You can use the `memory` option to specify the memory size for the AWS Lambda function:
0 commit comments