Can nomad dns resolve to a local hosts' host file?

Can nomad dns resolve to a local hosts’ host file? Or do I have to run a local dns server for internal ips?


See linux - How do `/etc/hosts` and DNS work together to resolve hostnames to IP addresses? - Unix & Linux Stack Exchange

However, I run dnsmasq on every nomad node to allow to also resolve consul domains:

$ cat /etc/dnsmasq.d/00-default

Thank you this was a very good suggestion… I didn’t understand it at first but now i got it.


I should have said, you would also need to tell your hosts to resolve to in /etc/resolv.conf. Depending on your distribution / cloud environment, this can be solved in various ways.

Hi @bradley, it seems like your question has been answered with the help of @resmo. If this isn’t the case, or if you have any followup, please let me know.

jrasell and the Nomad team.

A somewhat related discussion; relevant for raw_exec only, I think.