I’ve been trying to figure out how the local DNS server works with projects and containers with the same name when using the same bridged network. What I’m looking to achieve is have the containers separated into projects and stop conflicts from occurring when the same container name is used.
A basic example of what I’ve currently tried:
lxc launch images:ubuntu/22.04 c1 lxc launch images:ubuntu/22.04 c2 lxc project create p1 -c features.images=false -c features.profiles=false -c features.storage.volumes=false lxc project switch p1 lxc launch images:ubuntu/22.04 c1 lxc launch images:ubuntu/22.04 c2 lxc exec c2 -- resolvectl query c1.lxd lxc project switch default lxc exec c2 -- resolvectl query c1.lxd
It seems that regardless of the project, the local DNS server will return only one of the records for matched names between projects. Is there any way to alter the records returned by the local DNS server? Ideally at project level? I’d hoped that prefixing of the project to the container name might exist as a configuration option but I’ve not found much on this subject.
Is there a better way to handle this?
Any advise would be greatly appreciated