-network-interface=en0 is required when using Docker Desktop (e.g. on Mac or Windows) so that networking between tasks work.
- Create a cluster - Nomad Tutorial
- How to connect to my host network when using Docker Desktop (Windows and MacOS) - Nomad Docs
With Configuration File
MacOS Docker Desktop tricks
There seems to be an issue with ipv6 on MacOS (it seems like Docker Desktop doesn't support it).
There are a few Github issues related to it:
A fix seems to be to tweak the IPv6 config on Mac by:
- Go to Settings > Wi-Fi > Click the "Details..." button next to your network
- Under "TCP/IP" set "Configure IPv6" to "Link-local only"
- Restart Nomad
- In the Nomad UI, verify the fix by going to the client node and check the "unique.network.ip-address" attribute and verify that its an ipv4 address (instead of a ipv6 one)
From this Github comment
Created: May 27, 2023