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
preguntada hace 5 años441 visualizaciones
2 Respuestas
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
respondido hace 5 años
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
respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas