Stub Zones allow SkyDNS to point to a specific set of authoritative servers for a particular domain, rather than using standard recursion. When enabled, SkyDNS will consult the stub configuration before checking local records.
Requirements:
- SkyDNS must be started with the
-stubzones flag. - Configuration is managed via Etcd under the path
stub.dns.skydns.local..
Configuration Format:
Register services under the pattern: <domain>.stub.dns.skydns.local/<nameserver_id>. The value for each key must be a JSON object containing host and an optional port.
Example:
To point skydns.com to nameservers 172.16.1.1:54 and 10.10.244.1:53 (default), register:
# Nameserver 1
curl -XPUT http://127.0.0.1:4001/v2/keys/skydns/local/skydns/dns/stub/com/skydns/ns1 \
-d '{"host":"172.16.1.1", "port":54}'
# Nameserver 2 (port 53 is default)
curl -XPUT http://127.0.0.1:4001/v2/keys/skydns/local/skydns/dns/stub/com/skydns/ns2 \
-d '{"host":"10.10.244.1"}'