In cluster mode, still container goes on specific node but also you can move them
Pros of cluster mode is you get unified database cluster wide. So for example, containers
have unique names for them in entire cluster. Also in cluster mode, if you do not
specify which node container should go on with
--target, it will be assigned automatially.
LXD also supports vlan. Like in that post, you can attache VID tagged macvlan interfaces to
you containers. After doing so, I use my master node(one of node in cluster) to do DHCP to assign IP addresses to containers, and DNS server for local DNS resolve by container names.
You can do this with isc-dhcp-server and bind9 DDNS setup.
Then your containers will be pretty much stateless. You don’t have to worry about IP thing
because they’ll be able to communicate with each other by hostname and networks are seperated by VLAN. You can move your container from one to another, but still expect it to