How to change instance type in AWS ECS cluster?

后端 未结 8 1544
孤独总比滥情好
孤独总比滥情好 2021-02-01 01:34

I have a cluster in AWS EC2 Container Service. When I\'ve set it up, I used t2.micro instances because those were sufficient for development. Now I\'d like to use more powerful

8条回答
  •  耶瑟儿~
    2021-02-01 02:06

    This is how to do it without any downtime:

    1. Create a copy of the Launch Configuration used by your Auto Scaling Group, including any changes you want to make.
    2. Edit the Auto Scaling Group to:
      • Use the new Launch Configuration
      • Desired Capacity = Desired Capacity * 2
      • Min = Desired Capacity
    3. Wait for all new instances to become 'ACTIVE' in the ECS Instances tab of the ECS Cluster
    4. Select the old instances and click Actions -> Drain Instances
    5. Wait until all the old instances are running 0 tasks
    6. Edit the Auto Scaling Group and change Min and Desired back to their original values

提交回复
热议问题