Skip to content

Commit e0cb865

Browse files
author
Christopher Tauchen
authored
Merge pull request #40555 from chinmayi-chandrasekar/NE743_upstream_resolvers
NE743: document upstream resolvers
2 parents d67e480 + a9ab02f commit e0cb865

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

modules/nw-dns-forward.adoc

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
[id="nw-dns-forward_{context}"]
66
= Using DNS forwarding
77

8-
You can use DNS forwarding to override the forwarding configuration identified in `/etc/resolv.conf` on a per-zone basis by specifying which name server should be used for a given zone. If the forwarded zone is the Ingress domain managed by {product-title}, then the upstream name server must be authorized for the domain.
8+
You can use DNS forwarding to override the default forwarding configuration in the `/etc/resolv.conf` file in the following ways:
9+
10+
* Specify name servers for every zone. If the forwarded zone is the Ingress domain managed by {product-title}, then the upstream name server must be authorized for the domain.
11+
* Provide a list of upstream DNS servers.
12+
* Change the default forwarding policy.
13+
14+
[NOTE]
15+
=====
16+
A DNS forwarding configuration for the default domain can have both the default servers specified in the `/etc/resolv.conf` file and the upstream DNS servers.
17+
=====
918

1019
.Procedure
1120

@@ -16,7 +25,7 @@ You can use DNS forwarding to override the forwarding configuration identified i
1625
$ oc edit dns.operator/default
1726
----
1827
+
19-
This allows the Operator to create and update the ConfigMap named `dns-default` with additional server configuration blocks based on `Server`. If none of the servers has a zone that matches the query, then name resolution falls back to the name servers that are specified in `/etc/resolv.conf`.
28+
This allows the Operator to create and update the ConfigMap named `dns-default` with additional server configuration blocks based on `Server`. If none of the servers has a zone that matches the query, then name resolution falls back to the upstream DNS servers.
2029
+
2130
.Sample DNS
2231
[source,yaml]
@@ -42,10 +51,23 @@ spec:
4251
upstreams:
4352
- 3.3.3.3
4453
- 4.4.4.4:5454
54+
upstreamResolvers: <4>
55+
policy: Random <5>
56+
upstreams: <6>
57+
- type: SystemResolvConf <7>
58+
- type: Network
59+
address: 1.2.3.4 <8>
60+
port: 53 <9>
4561
----
46-
<1> `name` must comply with the `rfc6335` service name syntax.
47-
<2> `zones` must conform to the definition of a `subdomain` in `rfc1123`. The cluster domain, `cluster.local`, is an invalid `subdomain` for `zones`.
62+
<1> Must comply with the `rfc6335` service name syntax.
63+
<2> Must conform to the definition of a `subdomain` in `rfc1123`. The cluster domain, `cluster.local`, is an invalid `subdomain` for `zones`.
4864
<3> A maximum of 15 `upstreams` is allowed per `forwardPlugin`.
65+
<4> Optional. You can use it to override the default policy and forward DNS resolution to the specified DNS resolvers (upstream resolvers) for the default domain. If you do not provide any upstream resolvers, the DNS name queries go to the servers in `/etc/resolv.conf`.
66+
<5> Determines the order in which upstream servers are selected for querying. You can specify one of these values: `Random`, `RoundRobin`, and `Sequential`. The default value is `Sequential`.
67+
<6> Optional. You can use it to provide upstream resolvers.
68+
<7> You can specify two types of `upstreams` - `SystemResolvConf` and `Network`. `SystemResolvConf` is for configuring the upstream to use `/etc/resolv.conf` and `Network` is for defining a `Networkresolver`. You can specify one or both.
69+
<8> If the specified type is `Network`, you must provide an IP address. `address` must be a valid IPv4 or IPv6 address.
70+
<9> If the specified type is `Network`, you can optionally provide a port. `port` must be between 1 and 65535.
4971
+
5072
[NOTE]
5173
====
@@ -80,8 +102,8 @@ data:
80102
fallthrough in-addr.arpa ip6.arpa
81103
}
82104
prometheus :9153
83-
forward . /etc/resolv.conf {
84-
policy sequential
105+
forward . /etc/resolv.conf 1.2.3.4:53 {
106+
policy Random
85107
}
86108
cache 30
87109
reload

0 commit comments

Comments
 (0)