-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(eks): Unable to use Bottlerocket for managed nodegroup #17641
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServiceRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1
Description
What is the problem?
I'm trying to set up a new nodegroup which uses Bottlerocket. It fails with the following error:
Error: The specified AMI does not match the instance types architecture, either specify AL2_x86_64 or dont specify any
Reproduction Steps
import { App, Stack } from '@aws-cdk/core';
import { InstanceType } from '@aws-cdk/aws-ec2';
import { Cluster, KubernetesVersion, NodegroupAmiType } from '@aws-cdk/aws-eks';
const cluster = new Cluster(new Stack(new App()), 'eks-test-cluster', {
version: KubernetesVersion.V1_21,
});
cluster.addNodegroupCapacity('bottlerocket', {
instanceTypes: [new InstanceType('m5a.xlarge')],
amiType: NodegroupAmiType.BOTTLEROCKET_X86_64,
});What did you expect to happen?
I should not get an error and the nodegroup should be able to use Bottlerocket.
What actually happened?
I get the error mentioned above.
CDK CLI Version
1.133.0 (build 2dea31a)
Framework Version
No response
Node.js Version
v16.13.0
OS
Linux
Language
Typescript
Language Version
4.0.5
Other information
Looks like https://github.com/aws/aws-cdk/blob/v1.133.0/packages/@aws-cdk/aws-eks/lib/managed-nodegroup.ts#L367 checks that the given AMI type matches the expected AMI type. getAmiType calls getAmiTypeForInstanceType, which only lists NodegroupAmiType.AL2_X86_64 as the default version, and not the Bottlerocket enums at all.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServiceRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1