Skip to content

Commit

Permalink
feat(aws-eks): support bottlerocket managed nodegroup (#17323)
Browse files Browse the repository at this point in the history
Support Bottlerocket managed nodegroups and update the README as Bottlerocket has been supported in all AWS commercial regions since its [GA](https://aws.amazon.com/tw/about-aws/whats-new/2020/08/announcing-general-availability-of-bottlerocket/).

Fixes: #17324

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
pahud authored Nov 12, 2021
1 parent 284546d commit 2e6a1a9
Show file tree
Hide file tree
Showing 5 changed files with 1,592 additions and 4 deletions.
13 changes: 11 additions & 2 deletions packages/@aws-cdk/aws-eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,16 @@ To disable the installation of the termination handler, set the `spotInterruptHa
#### Bottlerocket

[Bottlerocket](https://aws.amazon.com/bottlerocket/) is a Linux-based open-source operating system that is purpose-built by Amazon Web Services for running containers on virtual machines or bare metal hosts.
At this moment, `Bottlerocket` is only supported when using self-managed auto-scaling groups.

> **NOTICE**: Bottlerocket is only available in [some supported AWS regions](https://github.com/bottlerocket-os/bottlerocket/blob/develop/QUICKSTART-EKS.md#finding-an-ami).
`Bottlerocket` is supported when using managed nodegroups or self-managed auto-scaling groups.

To create a Bottlerocket managed nodegroup:

```ts
cluster.addNodegroupCapacity('BottlerocketNG', {
amiType: NodegroupAmiType.BOTTLEROCKET_X86_64,
});
```

The following example will create an auto-scaling group of 2 `t3.small` Linux instances running with the `Bottlerocket` AMI.

Expand All @@ -480,6 +487,8 @@ For example, if the Amazon EKS cluster version is `1.17`, the Bottlerocket AMI v
Please note Bottlerocket does not allow to customize bootstrap options and `bootstrapOptions` properties is not supported when you create the `Bottlerocket` capacity.

For more details about Bottlerocket, see [Bottlerocket FAQs](https://aws.amazon.com/bottlerocket/faqs/) and [Bottlerocket Open Source Blog](https://aws.amazon.com/blogs/opensource/announcing-the-general-availability-of-bottlerocket-an-open-source-linux-distribution-purpose-built-to-run-containers/).

### Endpoint Access

When you create a new cluster, Amazon EKS creates an endpoint for the managed Kubernetes API server that you use to communicate with your cluster (using Kubernetes management tools such as `kubectl`)
Expand Down
10 changes: 9 additions & 1 deletion packages/@aws-cdk/aws-eks/lib/managed-nodegroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ export enum NodegroupAmiType {
/**
* Amazon Linux 2 (ARM-64)
*/
AL2_ARM_64 = 'AL2_ARM_64'
AL2_ARM_64 = 'AL2_ARM_64',
/**
* Bottlerocket Linux(ARM-64)
*/
BOTTLEROCKET_ARM_64 = 'BOTTLEROCKET_ARM_64',
/**
* Bottlerocket(x86-64)
*/
BOTTLEROCKET_X86_64 = 'BOTTLEROCKET_x86_64',
}

/**
Expand Down
Loading

0 comments on commit 2e6a1a9

Please sign in to comment.