admin管理员组

文章数量:1410705

I'm running Podman containers on two separate machines (let’s call them primary and secondary) using the following network setup:

podman network create --driver bridge --subnet 10.80.0.0/16 --gateway 10.80.0.1 testnet

Then I launch a container on each machine with:

podman run -d --name test-container --network testnet registry.access.redhat/ubi9/ubi sleep infinity

Each machine has a service listening on port 50003. On the primary machine, the service is accessible as primary:50003, and on the secondary as secondary:50003. From the host systems, I can successfully connect using:

curl -kv primary:50003
curl -kv secondary:50003

However, inside the container, on the primary machine, test-container can only reach primary:50003 (its own host), but not secondary:50003. On the secondary machine vice-versa

Why do the containers only see the local host’s service? Is this behavior due to the local scope of the Podman bridge network or related DNS resolution issues?

Any help would be very helpful!

本文标签: rhelPodman Container Isolation between different hosts in the same networkStack Overflow