AWS Fargate 服务和服务发现
AWS Fargate services and Service discovery
在我的 AWS ECS 集群中,我有两项服务:
- nginx
- 我的应用程序
然后在 nginx 中我想连接到 myapp
中的容器。我已通过服务发现启用了这两项服务,但无法连接到 myapp
:
我用了localhost
、127.0.0.1
、myapp.containername
,都没有用,都无法解决。我应该如何将 nginx 连接到 myapp
?
问题出在两件事上:
1- 服务嵌套在不同的可用区(创建服务时,选择 VPC 后,它会询问您想要的子网)
2- 安全组中的入站规则,来源为 0.0.0.0/0,我将其更改为 Anywhere 并且有效。
在我的 AWS ECS 集群中,我有两项服务:
- nginx
- 我的应用程序
然后在 nginx 中我想连接到 myapp
中的容器。我已通过服务发现启用了这两项服务,但无法连接到 myapp
:
我用了localhost
、127.0.0.1
、myapp.containername
,都没有用,都无法解决。我应该如何将 nginx 连接到 myapp
?
问题出在两件事上:
1- 服务嵌套在不同的可用区(创建服务时,选择 VPC 后,它会询问您想要的子网)
2- 安全组中的入站规则,来源为 0.0.0.0/0,我将其更改为 Anywhere 并且有效。