I have to move a microservices application on docker using docker compose. Everything is hosted on single node host.
I would like to specify a single network with multiples subnets for different types of resources and I would like to define the traffic routes betweent the subnet. I understood how to define multiple subnets in a single network, but I didn't understand how to route traffic between subnets. I also didn't find examples about this topic.
Inter container comunication and Whitelistig couldn't be an approach because it works only for default docker bridge (that doesn't support multi subnet). So I have the following questions:
- how can I route traffic between subnets?
- I haven't found examples related to the management of communications of multiple subnets in a single virtual network. Which can be the use cases to use multiple subnets in a single virtual network in an architecture that makes use of docker
- this is the wrong approach and should I use a container segmentation approach?