-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for launch template and custom AMI support
- Loading branch information
Showing
4 changed files
with
118 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Launch Template support for Managed Nodegroups | ||
|
||
eksctl supports launching managed nodegroups using a provided [EC2 Launch Template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html). | ||
This enables multiple customization options for nodegroups including providing custom AMIs and security groups, and passing user data for node bootstrapping. | ||
|
||
|
||
## Creating managed nodegroups using a provided launch template | ||
|
||
```yaml | ||
# managed-cluster.yaml | ||
# A cluster with two managed nodegroups | ||
--- | ||
apiVersion: eksctl.io/v1alpha5 | ||
kind: ClusterConfig | ||
|
||
metadata: | ||
name: managed-cluster | ||
region: us-west-2 | ||
|
||
managedNodeGroups: | ||
- name: managed-ng-1 | ||
launchTemplate: | ||
id: lt-12345 | ||
version: "2" # optional (uses the default launch template version if unspecified) | ||
|
||
- name: managed-ng-2 | ||
minSize: 2 | ||
desiredCapacity: 2 | ||
maxSize: 4 | ||
labels: | ||
role: worker | ||
tags: | ||
nodegroup-name: managed-ng-2 | ||
privateNetworking: true | ||
launchTemplate: | ||
id: lt-12345 | ||
|
||
``` | ||
|
||
|
||
## Upgrading a managed nodegroup to use a different launch template version | ||
|
||
```shell | ||
eksctl upgrade nodegroup --name=managed-ng-1 --cluster=managed-cluster --launch-template-version=3 | ||
``` | ||
|
||
!!!note | ||
If a launch template is using a custom AMI, then the new version should also use a custom AMI or the upgrade operation will fail | ||
|
||
|
||
If a launch template is not using a custom AMI, the Kubernetes version to upgrade to can also be specified: | ||
|
||
```shell | ||
eksctl upgrade nodegroup --name=managed-ng-1 --cluster=managed-cluster --launch-template-version=3 --kubernetes-version=1.17 | ||
``` | ||
|
||
|
||
## Notes on custom AMI and launch template support | ||
- When a launch template is provided, the following fields are not supported: instanceType, ami, ssh.allow, ssh.sourceSecurityGroupIds, securityGroups, | ||
volumeSize, instanceName, instancePrefix, maxPodsPerNode, preBootstrapCommands or overrideBootstrapCommand. | ||
- When using a custom AMI (`ami`), `overrideBootstrapCommand` must also be set to perform the bootstrapping. | ||
- `overrideBootstrapCommand` can only be set when using a custom AMI. | ||
- When a launch template is provided, tags specified in the nodegroup config are not propagated to EC2 instances. |