How to access remote containers using dns, such as *.lxd in local machine

Hi all, some guidance needed here.

i have two VMs setup with lxd, one local and one remote. Both working fine with self-hosted containers. In addition, i have a proxy setup at local to route traffic to respective containers. It works for containers hosted in local. Now, I would like to route traffic to containers hosted in remote. I am wondering how can i access remote containers using the same way as accessing local container, such as .lxd.

Thanks in advance for your guidance.

See this recent discussion. There is a link towards a blog post about how to connect those two LXD installations and how to elevate one installation to handle all DNS.

Thanks for the reply.

I tried to setup accordingly to this post https://stgraber.org/2016/10/27/network-management-with-lxd-2-3/ using tunnels. However, there is no success so far. The containers created in remote lxd host are not getting any ip address assigned to them as shown in lxc list.

Additional information for my question: both lxd hosts are in the same network, ‘local’ lxd host = 10.148.0.2/24 & ‘remote’ lxd host = 10.148.0.4/24.

“This type of tunnels only works when both hosts are on the same physical segment.”

quoted from the post. Wondering what does it mean by ‘physical segment’?