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
+58-18Lines changed: 58 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,9 @@ A DNS forwarding configuration for the default domain can have both the default
26
26
$ oc edit dns.operator/default
27
27
----
28
28
+
29
-
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.
29
+
This allows the Operator to create and update the config map named `dns-default` with additional server configuration blocks based on `Server`. If none of the servers have a zone that matches the query, then name resolution falls back to the upstream DNS servers.
30
30
+
31
-
.Sample DNS
31
+
.Configuring DNS forwarding
32
32
[source,yaml]
33
33
----
34
34
apiVersion: operator.openshift.io/v1
@@ -37,23 +37,14 @@ metadata:
37
37
name: default
38
38
spec:
39
39
servers:
40
-
- name: foo-server <1>
40
+
- name: example-server <1>
41
41
zones: <2>
42
42
- example.com
43
43
forwardPlugin:
44
44
policy: Random <3>
45
45
upstreams: <4>
46
46
- 1.1.1.1
47
47
- 2.2.2.2:5353
48
-
- name: bar-server
49
-
zones:
50
-
- bar.com
51
-
- example.com
52
-
forwardPlugin:
53
-
policy: Random
54
-
upstreams:
55
-
- 3.3.3.3
56
-
- 4.4.4.4:5454
57
48
upstreamResolvers: <5>
58
49
policy: Random <6>
59
50
upstreams: <7>
@@ -63,22 +54,71 @@ spec:
63
54
port: 53 <10>
64
55
----
65
56
<1> Must comply with the `rfc6335` service name syntax.
66
-
<2> Must conform to the definition of a `subdomain` in `rfc1123`. The cluster domain, `cluster.local`, is an invalid `subdomain` for `zones`.
67
-
<3> Defines the policy to select upstream resolvers. Default value is `Random`. You can also use `RoundRobin`, and `Sequential`.
57
+
<2> Must conform to the definition of a subdomain in the `rfc1123` service name syntax. The cluster domain, `cluster.local`, is an invalid subdomain for the `zones` field.
58
+
<3> Defines the policy to select upstream resolvers. Default value is `Random`. You can also use the values `RoundRobin`, and `Sequential`.
68
59
<4> A maximum of 15 `upstreams` is allowed per `forwardPlugin`.
69
60
<5> 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`.
70
61
<6> Determines the order in which upstream servers are selected for querying. You can specify one of these values: `Random`, `RoundRobin`, or `Sequential`. The default value is `Sequential`.
71
62
<7> Optional. You can use it to provide upstream resolvers.
72
63
<8> You can specify two types of `upstreams` - `SystemResolvConf` and `Network`. `SystemResolvConf` configures the upstream to use `/etc/resolv.conf` and `Network` defines a `Networkresolver`. You can specify one or both.
73
-
<9> If the specified type is `Network`, you must provide an IP address. `address` must be a valid IPv4 or IPv6 address.
74
-
<10> If the specified type is `Network`, you can optionally provide a port. `port` must be between 1 and 65535.
64
+
<9> If the specified type is `Network`, you must provide an IP address. The `address` field must be a valid IPv4 or IPv6 address.
65
+
<10> If the specified type is `Network`, you can optionally provide a port. The `port` field must have a value between `1` and `65535`. If you do not specify a port for the upstream, by default port 853 is tried.
66
+
+
67
+
When working in a highly regulated environment, you might need the ability to secure DNS traffic when forwarding requests to upstream resolvers so that you can ensure additional DNS traffic and data privacy. Cluster administrators can configure transport layer security (TLS) for forwarded DNS queries.
68
+
+
69
+
.Configuring DNS forwarding with TLS
70
+
[source,yaml]
71
+
----
72
+
apiVersion: operator.openshift.io/v1
73
+
kind: DNS
74
+
metadata:
75
+
name: default
76
+
spec:
77
+
servers:
78
+
- name: example-server <1>
79
+
zones: <2>
80
+
- example.com
81
+
forwardPlugin:
82
+
transportConfig:
83
+
transport: TLS <3>
84
+
tls:
85
+
caBundle:
86
+
name: mycacert
87
+
serverName: dnstls.example.com <4>
88
+
policy: Random <5>
89
+
upstreams: <6>
90
+
- 1.1.1.1
91
+
- 2.2.2.2:5353
92
+
upstreamResolvers: <7>
93
+
transportConfig:
94
+
transport: TLS
95
+
tls:
96
+
caBundle:
97
+
name: mycacert
98
+
serverName: dnstls.example.com
99
+
upstreams:
100
+
- type: Network <8>
101
+
address: 1.2.3.4 <9>
102
+
port: 53 <10>
103
+
----
104
+
<1> Must comply with the `rfc6335` service name syntax.
105
+
<2> Must conform to the definition of a subdomain in the `rfc1123` service name syntax. The cluster domain, `cluster.local`, is an invalid subdomain for the `zones` field. The cluster domain, `cluster.local`, is an invalid `subdomain` for `zones`.
106
+
<3> When configuring TLS for forwarded DNS queries, set the `transport` field to have the value `TLS`.
107
+
By default, CoreDNS caches forwarded connections for 10 seconds. CoreDNS will hold a TCP connection open for those 10 seconds if no request is issued. With large clusters, ensure that your DNS server is aware that it might get many new connections to hold open because you can initiate a connection per node. Set up your DNS hierarchy accordingly to avoid performance issues.
108
+
<4> When configuring TLS for forwarded DNS queries, this is a mandatory server name used as part of the server name indication (SNI) to validate the upstream TLS server certificate.
109
+
<5> Defines the policy to select upstream resolvers. Default value is `Random`. You can also use the values `RoundRobin`, and `Sequential`.
110
+
<6> Required. You can use it to provide upstream resolvers. A maximum of 15 `upstreams` entries are allowed per `forwardPlugin` entry.
111
+
<7> 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`.
112
+
<8> `Network` type indicates that this upstream resolver should handle forwarded requests separately from the upstream resolvers listed in `/etc/resolv.conf`. Only the `Network` type is allowed when using TLS and you must provide an IP address.
113
+
<9> The `address` field must be a valid IPv4 or IPv6 address.
114
+
<10> You can optionally provide a port. The `port` must have a value between `1` and `65535`. If you do not specify a port for the upstream, by default port 853 is tried.
75
115
+
76
116
[NOTE]
77
117
====
78
-
If `servers` is undefined or invalid, the ConfigMap only contains the default server.
118
+
If `servers` is undefined or invalid, the config map only contains the default server.
0 commit comments