From dc23d55524aa9ac614c8f0881908a8a81e0d3183 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Wed, 9 Aug 2017 11:13:30 -0500 Subject: [PATCH] Add note about configuring recursors to be able to resolve external services. --- website/source/docs/guides/external.html.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/website/source/docs/guides/external.html.md b/website/source/docs/guides/external.html.md index 53032768a7..fc7be7b69e 100644 --- a/website/source/docs/guides/external.html.md +++ b/website/source/docs/guides/external.html.md @@ -20,7 +20,9 @@ node service definition. 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 -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 "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 ``` +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: ```text