如何在AWS ECS集群中更改实例类型? [英] How to change instance type in AWS ECS cluster?
问题描述
我在AWS EC2容器服务中有一个集群.设置好之后,我使用了t2.micro实例,因为这些实例足以进行开发.现在,我想使用功能更强大的实例,例如m4.large.
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 instances, like m4.large.
我想知道是否仅可以更改实例类型,所以不需要重新创建整个集群.我找不到该怎么做.
I would like to know whether it is possible to change the instance types only, so I don't need to recreate the whole cluster. I could not find how to do this.
推荐答案
是的,这是可能的.
群集中的实例类型由启动配置中的实例类型"设置确定.要更新实例类型而不必重新创建集群,请执行以下操作:
The instance types in your cluster are determined by the 'Instance Type' setting within your Launch Configuration. To update the instance type without having to recreate the cluster:
- 复制群集启动配置,并更新实例类型".
- 调整群集 Auto Scaling组以指向新的启动配置.
- 等待新实例在集群中注册,然后启动服务.
- Make a copy of the cluster Launch Configuration and update the 'Instance Type'.
- Adjust the cluster Auto Scaling Group to point to your new Launch Configuration.
- Wait for your new instances to register in your cluster and your services to start.
您还可以通过创建链接到不同启动配置的多个Auto Scaling组,将多个实例类型添加到单个群集.但是请注意,您不能在控制台内轻松复制Auto Scaling组.
You can also add multiple instances types to a single cluster by creating multiple Auto Scaling Groups linked to different Launch Configurations. Note however that you can't copy Auto Scaling Groups easily within the console.
这篇关于如何在AWS ECS集群中更改实例类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!