EC2 - Windows 2019 with containers: call service on host

0

I'm using the "Windows 2019 with containers" AMI on an EC2 instance. This allows me to deploy Windows based Docker containers (not Docker Linux-based containers). The networking variant that's configured out of the box is 'nat'. I haven't succeeded in setting up another networking type.

The reason to deploy on EC2 is that we'd like to mix (newer) Windows container based services with legacy native services on a single host.

However, if I deploy a web-service on the host outside of the container, then I can't call that from the container using the IP address of the host. I haven't been able to determine if there's an alternate address that would work.

Outside of AWS (EC2), this is supported by Windows 2019, but the network setup in AWS and of course the virtualization appears to put some constraints on what's possible.

Calling the web-service from outside the container, direcly on the host, works.
A container on this host can post a request to a webservice outside of the host.
A container on this host can post a request to a webservice in another container on the host (apparantly the port mapping works). The address I'm using is then simply the IP address of the host.

I there a way to call, from a windows-container on Windows 2019 on EC2, a service on the same host?

HenkH
已提问 5 年前441 查看次数
2 回答
0

What is also possible is to route the traffic from the container, via an Elastic IP adres back to a service on the host (with the appropriate access and firewall settings).

HenkH
已回答 5 年前
0

I've setup a new system, with new VPC configuration and was able to call services on the host from inside the container.
I'm not sure that my original observation was correct. It is possible that there as a problem in either:

  • my first VPC configuration.
  • the configuration of the Windows firewall on the host. I've added rules to accept incoming traffic to the services on specific ports.
HenkH
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则