我正在尝试使用应用程序负载均衡器在 ecs 集群上创建服务,以运行具有两个容器、一个 api 和 redis 的任务定义。当我尝试创建服务时,我收到错误“服务创建失败/n 服务创建失败:”,它没有给我任何关于错误的信息。
我希望该服务通过让该服务为我创建一个新的目标组来自动注册我的 ecs ec2 的正确端口。我的 api 容器有主机端口:0 和容器端口:3000。我的 redis 容器有主机端口:0 和容器端口:6379,都使用 tcp。
我将在下面粘贴我的服务配置的文本版本。
Review
Cluster: rest-api-explorer
Launch type: EC2
Task Definition: rest-api-explorer:19
Service name: rest-api-service
Service type: DAEMON
Minimum healthy: percent 0
Maximum percent: 100
Configure network
Health check grace period: 10
Container Name: api-rest-explorer
Container Port: 3000
ELB Name: rest-api-explorer
Target Group: ecs-created-rest-api-service
Health Check Path: /api/rest/console
Listener Port: 3000
Path-pattern: /api/rest/console
Service Role: AWSServiceRoleForECS
Set Auto Scaling (optional)
not configured