Managed Node Pools on Amazon Elastic Kubernetes Service (Amazon EKS)
EKS supports configuring the same launch template. The nodes in the node-group will be recycled by new nodes with new configurations when updating the launch template version.
See Launch template support for more information.
The following is an example to replace cluster nodes with new storage size.
Storage Expansion
- 
In Longhorn, set replica-replenishment-wait-intervalto0.
- 
Go to the launch template of the EKS cluster node-group. You can find in the EKS cluster tab Configuration/Compute/<node-group-name>and click the launch template.
- 
Click Modify template (Create new version)in theActionsdrop-down menu.
- 
Choose the Source template versionin theLaunch template name and version description.
- 
Follow steps to Expand volume, or Create additional volume. If you choose to expand by create additional volume, the disks need to be manually added to the disk list of the nodes after the EKS cluster upgrade. 
Expand volume
- 
Update the volume size in Configure storage.
- 
Click Create template versionto save changes.
- 
Go to the EKS cluster node-group and change Launch template versioninNode Group configuration. Track the status in theUpdate historytab.
Create additional volume
- 
Click AdvancedthenAdd new volumeinConfigure storageand fill in the fields.
- 
Adjust the auto-mount script and add to User datainAdvanced details. Make sure theDEV_PATHmatches theDevice nameof the additional volume.MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==MYBOUNDARY==" --==MYBOUNDARY== Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash # https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-user-data echo "Running custom user data script" DEV_PATH="/dev/sdb" mkfs -t ext4 ${DEV_PATH} MOUNT_PATH="/mnt/longhorn" mkdir ${MOUNT_PATH} mount ${DEV_PATH} ${MOUNT_PATH}
- 
Click Create template versionto save changes.
- 
Go to the EKS cluster node-group and change Launch template versioninNode Group configuration. Track the status in theUpdate historytab.
- 
In Longhorn, add the path of the mounted disk into the disk list of the nodes.