Add note about configuring recursors to be able to resolve external services.

pull/3380/head
Preetha Appan 2017-08-09 11:13:30 -05:00
parent 81194972a0
commit dc23d55524
1 changed files with 8 additions and 1 deletions

View File

@ -20,7 +20,9 @@ node service definition.
Once registered, the DNS interface will be able to return the appropriate A Once registered, the DNS interface will be able to return the appropriate A
records or CNAME records for the service. The service will also appear in standard records or CNAME records for the service. The service will also appear in standard
queries against the API. queries against the API. Consul must be configured with a list of
[recursors](/docs/agent/options.html#recursors) for it to be able to resolve
external service addresses.
Let us suppose we want to register a "search" service that is provided by Let us suppose we want to register a "search" service that is provided by
"www.google.com". We might accomplish that like so: "www.google.com". We might accomplish that like so:
@ -32,6 +34,11 @@ $ curl -X PUT -d '{"Datacenter": "dc1", "Node": "google",
http://127.0.0.1:8500/v1/catalog/register http://127.0.0.1:8500/v1/catalog/register
``` ```
Add an upstream DNS server to the list of recursors to Consul's configuration. Example with Google's public DNS server:
```text
"recursors":["8.8.8.8"]
```
If we do a DNS lookup now, we can see the new search service: If we do a DNS lookup now, we can see the new search service:
```text ```text