Manage Node-Group on AWS 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

  1. In Longhorn, set replica-replenishment-wait-interval to 0.

  2. 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.

  3. Click Modify template (Create new version) in the Actions drop-down menu.

  4. Choose the Source template version in the Launch template name and version description.

  5. Follow steps to Expand volume, or Create additional volume.

Note: 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

  1. Update the volume size in Configure storage.

  2. Click Create template version to save changes.

  3. Go to the EKS cluster node-group and change Launch template version in Node Group configuration. Track the status in the Update history tab.

Create additional volume

  1. Click Advanced then Add new volume in Configure storage and fill in the fields.

  2. Adjust the auto-mount script and add to User data in Advanced details. Make sure the DEV_PATH matches the Device name of the additional volume.

    1. MIME-Version: 1.0
    2. Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
    3. --==MYBOUNDARY==
    4. Content-Type: text/x-shellscript; charset="us-ascii"
    5. #!/bin/bash
    6. # https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-user-data
    7. echo "Running custom user data script"
    8. DEV_PATH="/dev/sdb"
    9. mkfs -t ext4 ${DEV_PATH}
    10. MOUNT_PATH="/mnt/longhorn"
    11. mkdir ${MOUNT_PATH}
    12. mount ${DEV_PATH} ${MOUNT_PATH}
  3. Click Create template version to save changes.

  4. Go to the EKS cluster node-group and change Launch template version in Node Group configuration. Track the status in the Update history tab.

  5. In Longhorn, add the path of the mounted disk into the disk list of the nodes.


© 2019-2023 Longhorn Authors | Documentation Distributed under CC-BY-4.0

© 2023 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.

Manage Node-Group on AWS EKS - 图1 Manage Node-Group on AWS EKS - 图2 Manage Node-Group on AWS EKS - 图3 Manage Node-Group on AWS EKS - 图4 Manage Node-Group on AWS EKS - 图5