Hello. Is there a way for a task (Docker driver) to communicate with the Nomad HTTP API on host port 4646 without having to use host networking? Currently with this job file I can communicate with the Nomad HTTP API via localhost:4646 but I’d like to avoid having to use network_mode = "host".
I’m not sure which default variables are exposed but you can check them via nomad exec -t <allocation-id> env.
This should work as long as you take some sort of linux as base image.
Another option could be to register the nomad-ui in consul and use the default service discovery options for consul services.
Is there also a way to do this with Consul Connect? I have Nomad registered as a service within Consul. However, I’m not able to communicate with Nomad still with this config