Skip to content

Commit 0bee78e

Browse files
committed
doc(eks): fix(eks): update support for AL2023 nodegroups creation
1 parent 3fe98e0 commit 0bee78e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/aws-cdk-lib/aws-eks/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ cluster.addNodegroupCapacity('custom-node-group', {
187187
instanceTypes: [new ec2.InstanceType('m5.large')],
188188
minSize: 4,
189189
diskSize: 100,
190-
amiType: eks.NodegroupAmiType.AL2_X86_64_GPU,
191190
});
192191
```
193192

@@ -207,6 +206,24 @@ cluster.addNodegroupCapacity('custom-node-group', {
207206
});
208207
```
209208

209+
To define the type of the AMI for the node group, you may explicitly define `amiType` according to your requirements, supported amiType could be found [HERE](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.NodegroupAmiType.html).
210+
211+
```ts
212+
declare const cluster: eks.Cluster;
213+
214+
// X86_64 based AMI managed node group
215+
cluster.addNodegroupCapacity('custom-node-group', {
216+
instanceTypes: [new ec2.InstanceType('m5.large')], // NOTE: if amiType is x86_64-based image, the instance types here must be x86_64-based.
217+
amiType: eks.NodegroupAmiType.AL2023_X86_64_STANDARD,
218+
});
219+
220+
// ARM_64 based AMI managed node group
221+
cluster.addNodegroupCapacity('custom-node-group', {
222+
instanceTypes: [new ec2.InstanceType('m6g.medium')], // NOTE: if amiType is ARM-based image, the instance types here must be ARM-based.
223+
amiType: eks.NodegroupAmiType.AL2023_ARM_64_STANDARD,
224+
});
225+
```
226+
210227
To define the maximum number of instances which can be simultaneously replaced in a node group during a version update you can set `maxUnavailable` or `maxUnavailablePercentage` options.
211228

212229
> For more details visit [Updating a managed node group](https://docs.aws.amazon.com/eks/latest/userguide/update-managed-node-group.html)

0 commit comments

Comments
 (0)