You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nw-dns-forward.adoc
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,16 @@
5
5
[id="nw-dns-forward_{context}"]
6
6
= Using DNS forwarding
7
7
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
+
=====
9
18
10
19
.Procedure
11
20
@@ -16,7 +25,7 @@ You can use DNS forwarding to override the forwarding configuration identified i
16
25
$ oc edit dns.operator/default
17
26
----
18
27
+
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.
20
29
+
21
30
.Sample DNS
22
31
[source,yaml]
@@ -42,10 +51,24 @@ spec:
42
51
upstreams:
43
52
- 3.3.3.3
44
53
- 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>
45
61
----
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`.
48
64
<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.
0 commit comments