So I’ve been digging into LXD and it’s been a great ride so far. I’m really enjoying the flexibility of it and the ability to run containers and VMs if needed. I’ve been reading a ton of posts on this forum as I’ve been learning and finally made an account to join in. Enough preamble.
So I’ve been making containers to learn and trying different ways of connecting them to the network. I’ve created containers with a macvlans profile to get an IP address from DHCP, I’ve created containers that used dnsmasq but connected host ports to the containers, and I’ve made a NGINX container to reverse proxy into other containers. I feel comfortable executing any of these steps now.
The thing I’m failing to understand is when would you use these various methods of creating a connection. I can see using a macvlans profile if the container is running something like PiHole that benefits from having a dedicated IP address from the router, but in general should I be trying to avoid macvlans and try to reverse proxy connections? Or does that only work for web services, and I should be trying to port forward instead? I guess I’m asking what the best practice is for connecting these containers to a network.
Not a super technical question, and very noobish, but I appreciate any input or use case examples.