在没有公共IP的情况下将EC2实例注册到ECS集群 [英] Register EC2 instance to ECS cluster without public ip
问题描述
我很难将在VPC和专用子网(未连接互联网网关)上创建的实例添加到ECS群集。
I'm having hard times adding instances that are created in my VPC and on a private subnet(no internet gateway attached to it) to ECS cluster.
现在,我设法做到这一点的唯一方法是添加公共IP并配置了NAT实例/网关。
Right now the only way I've managed to do this was by adding a public IP and have a NAT instance/gateway configured.
如何将ECS群集与私有子网一起使用?
How do you use ECS clusters with private subnets?
推荐答案
我想我已经在AWS文档中找到了答案,似乎我需要使用NAT实例/网关:(
I guess I've found the answer on the AWS documentation and it seems I need to use a NAT instance/Gateway :(
...容器实例需要外部网络访问权限才能与Amazon ECS服务终端节点进行通信,因此,如果您的容器实例运行在私有VPC中,则它们需要一个网络地址转换(NAT)实例来提供此访问权限。有关更多信息,请参阅NAT实例Amazon VPC用户指南。
"...Container instances need external network access to communicate with the Amazon ECS service endpoint, so if your container instances are running in a private VPC, they need a network address translation (NAT) instance to provide this access. For more information, see NAT Instances in the Amazon VPC User Guide."
这篇关于在没有公共IP的情况下将EC2实例注册到ECS集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!