I’ve got 3 machines running a cluster of consul/nomad agents.
I deploy an nginx job and I can hit the IP address/port of the allocation and view the files served by the nginx job.
How do I connect my domain name to that job? My domain is pointing to DigitalOcean’s nameservers where I can create DNS records. I could manually create an A record from my domain to the IP address of the machine with the allocation running the nginx job. But what if the job moves to a different machine?
I know that from a machine within the cluster I can
dig @127.0.0.1 -p 8600 some-name.service.consul ANY to get the IP of the agent running the service. But how do I hit that from an external domain?
I know this isn’t an unusual ask. I just can’t seem to find any material describing this (or the material that does describe it is so foreign that I don’t realize that it’s what I’m looking for).