简体   繁体   中英

AWS ECS cluster is not showing container

I am trying to create an ECS cluster(using cloudformation template), where i can create an instance installed with an provided AMI through Yaml file But the problem i am facing -

In Yaml file -

I am creating a cluster then creating a service and task with minimum required values

The cluster is creating service is also creating but I can't see any Container instance there.

How can I be able to see container instance, what kind of changes/modifications I need to make in my YAML file?

在此处输入图片说明

ECS is amazon manage service you donot have any type of access to underlying resources.

ECS also known as fargate and in that task is there it & not create container instances.

there is total two launch type in ECS where

  • ECS fargate launch type
  • EC2 launch type

in second launch type ec2 only it create container instance and you can watch it in ec2 section while with fargate you have to manage it as task defination

Launch type definition documentation : https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html

you can read more here : https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html

For EC2 launch type your cluster type will be same

Type: AWS::ECS::Cluster

But SG, VPC,NATGateway and other resources will change

EcsHostSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: Access to the ECS hosts that run containers
      VpcId: !Ref 'VPC'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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