mirror of https://github.com/status-im/consul.git
added hcl
This commit is contained in:
parent
0a3c012691
commit
34df6ced93
|
@ -98,19 +98,23 @@ node's metadata key starts with `rfc1035-`.
|
||||||
|
|
||||||
## Alternative Domain
|
## Alternative Domain
|
||||||
|
|
||||||
By default, Consul responds to DNS queries only for its configured
|
By default, Consul responds to DNS queries in the `consul` domain,
|
||||||
[`domain`](/docs/agent/options#domain).
|
but you can set a specific domain for responding to DNS queries by configuring the [`domain`](/docs/agent/options#domain) parameter.
|
||||||
|
|
||||||
Some use cases require responding to queries for more than one domain,
|
In some instances, Consul may need to respond to queries in more than one domain,
|
||||||
such as during a DNS migration or to distinguish between internal and
|
such as during a DNS migration or to distinguish between internal and external queries.
|
||||||
external queries by using different domains.
|
|
||||||
|
|
||||||
Consul versions 1.5.2+ can be configured to respond to DNS queries on an alternative domain
|
Consul versions 1.5.2+ can be configured to respond to DNS queries on an alternative domain
|
||||||
through the [`alt_domain`](/docs/agent/options#alt_domain) agent configuration
|
through the [`alt_domain`](/docs/agent/options#alt_domain) agent configuration
|
||||||
option. As of Consul versions 1.11.0+, Consul's DNS response will use the same domain as was used in the query;
|
option. As of Consul versions 1.11.0+, Consul's DNS response will use the same domain as was used in the query;
|
||||||
in prior versions, the response may use the primary [`domain`](/docs/agent/options#domain) no matter which
|
in prior versions, the response may use the primary [`domain`](/docs/agent/options#domain) no matter which
|
||||||
domain was used in the query.
|
domain was used in the query.
|
||||||
For example, if `test-domain` is configured as the alternative domain, the following query:
|
|
||||||
|
In the following example, the `alt_domain` parameter is set to `test-domain`:
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
alt_domain = "test-domain"
|
||||||
|
```
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ dig @127.0.0.1 -p 8600 consul.service.test-domain SRV
|
$ dig @127.0.0.1 -p 8600 consul.service.test-domain SRV
|
||||||
|
|
Loading…
Reference in New Issue