I'm putting together a home lab with two mini PCs and a NAS, using the NAS as the Docker Swarm manager and the mini PCs as worker nodes. I know this might not be the most reliable setup since if the NAS dies, everything goes with it. My network has a main VLAN without tagging, and a separate tagged VLAN for IoT devices that connect via WiFi. Currently, I'm trying to move Frigate, which is running on another server, to my new Docker Swarm setup. I've read about macvlan and ipvlan, but I'm unsure how to connect services to specific VLANs. Is there a way to specify that a service needs to use a certain VLAN and allow it to communicate within that tag?
2 Answers
Just keep in mind that VLANs work a bit differently than you might expect. They don’t operate like VPNs for logical IP segmentation. If you're diving into this, it might be good to get familiar with untagged and tagged ports, as well as how managed switches handle this. These concepts can help you manage your setup better!
When it comes to Docker, VLANs aren't set per service or per container directly. Instead, you'll have to create a separate Docker network for each VLAN you want to use, and then attach your service to those networks. Check out the Docker documentation on macvlan for more details on how to set that up! Just a heads up, I've never used macvlan with swarm, it seems to go against what swarm is designed for.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically