简体   繁体   English

AWS 自动继续创建 ECS 实例。

[英]AWS automatically keep on creating ECS instance.

I was playing with ECS service and ended up deleting all services and related clusters.我在玩 ECS 服务,最后删除了所有服务和相关集群。 But in ec2 dashboard, as soon as I kill instances like "ECS Instance - EC2ContainerService-default-8f8f5fd5-dbfc-4f81-843a-c028e86a1657" it creates another instance.但是在 ec2 仪表板中,一旦我杀死像“ECS 实例 - EC2ContainerService-default-8f8f5fd5-dbfc-4f81-843a-c028e86a1657”这样的实例,它就会创建另一个实例。 Do any one have pointers how can I disable this automatic build.有没有人知道如何禁用此自动构建。

Did you create the instance thru Elastic Beanstalk?您是否通过 Elastic Beanstalk 创建了实例? Chances are ELB, or an autoscaling policy is interpreting your instance being shutdown as a crash, so its creating a new one to replace it, ie doing what it is supposed to do.可能是 ELB,或者自动缩放策略将您的实例关闭解释为崩溃,因此它创建一个新实例来替换它,即做它应该做的事情。

Make sure any autoscale policies you have in place are also turned off.确保您拥有的所有自动缩放策略也已关闭。

In my case it was the autoscalling policy and as I am pretty new to AWS from GCP it was a bit of a doozy to find.就我而言,这是自动调用策略,因为我是 GCP 的 AWS 新手,所以很难找到。

On the EC2 console page just scroll down on the left to the Auto Scaling or: https://console.aws.amazon.com/ec2/autoscaling/home?region=us-east-1#AutoScalingGroups :在 EC2 控制台页面上,只需在左侧向下滚动到 Auto Scaling 或: https://console.aws.amazon.com/ec2/autoscaling/home?region=us-east-1#AutoScalingGroups

Deregister container instances and delete cluster.注销容器实例并删除集群。 Click the "x" of the cluster you want to delete.单击要删除的集群的“x”。 It will stop creating a new instance automatically.它将自动停止创建新实例。 Regards, Thirumal Peesari问候,蒂鲁马尔·皮萨里

事实证明,存在一些自动缩放策略,它正在推动新虚拟机的创建

对我来说,重新创建终止实例的是 CloudFormation 策略。

For me it was "Spot Request".对我来说,它是“现货请求”。 Even though I terminated the instance, the spot request would make a new one everytime my bid could be fulfilled.即使我终止了实例,每次可以满足我的出价时,现场请求都会发出新的请求。

In the instance details page, under tags you could find which one of the on-demand instance would have created the instance.在实例详细信息页面中,在标签下,您可以找到哪个按需实例创建了该实例。 ECS supports spot instance selection and in case if you have deleted the cluster, most likely it wouldnt have deleted the spot requests which you could find under (change it for your region) https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#SpotInstances : ECS 支持 spot 实例选择,如果您删除了集群,它很可能不会删除您可以在(根据您的区域更改) https://us-east-2.console.aws 下找到的 spot 请求。 amazon.com/ec2/home?region=us-east-2#SpotInstances

deleting the spot request resource would kill you phantom instances删除 spot 请求资源会杀死你的幻影实例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM