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

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.