I have the mesos masters/slave running on the network 192.168.10.x and I would like the applications to be connected to the 192.168.122.x network.
I managed to get this working with creating a 'host route' in the container namespace, with this: { "name": "cni-apps", "type": "bridge", "bridge": "cni-apps0", "mtu": 1462, "isGateway": false, "ipMasq": false, "ipam": { "type": "host-local", "subnet": "192.168.122.0/24", "rangeStart": "192.168.122.171", "rangeEnd": "192.168.122.179", "routes": [ { "dst": "192.168.10.153/32", "gw": "0.0.0.0" }] }, "args": { "cni": { "ips": ["192.168.122.175"] } } } Here the slave/agent is on 192.168.10.153 Is there a better way to do this? This works fine with bridges, but when I use the macvtap cni plugin I also have to create a route on the host agent to the container via a host macvtap interface. Which complicates creating and removing them.