Skip to content

Commit ff0e7c3

Browse files
authored
Merge pull request #80597 from abrennan89/privateDNS
OCPBUGS-11653: Update abstract for private DNS config module
2 parents 838c497 + 9327cd3 commit ff0e7c3

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

modules/private-clusters-setting-dns-private.adoc

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="private-clusters-setting-dns-private_{context}"]
7-
= Setting DNS to private
7+
= Configuring DNS records to be published in a private zone
88

9-
After you deploy a cluster, you can modify its DNS to use only a private zone.
9+
For all {product-title} clusters, whether public or private, DNS records are published in a public zone by default.
10+
11+
You can remove the public zone from the cluster DNS configuration to avoid exposing DNS records to the public. You might want to avoid exposing sensitive information, such as internal domain names, internal IP addresses, or the number of clusters at an organization, or you might simply have no need to publish records publicly. If all the clients that should be able to connect to services within the cluster use a private DNS service that has the DNS records from the private zone, then there is no need to have a public DNS record for the cluster.
12+
13+
After you deploy a cluster, you can modify its DNS to use only a private zone by modifying the `DNS` custom resource (CR).
14+
Modifying the `DNS` CR in this way means that any DNS records that are subsequently created are not published to public DNS servers, which keeps knowledge of the DNS records isolated to internal users. This can be done when you configure the cluster to be private, or if you never want DNS records to be publicly resolvable.
15+
16+
Alternatively, even in a private cluster, you might keep the public zone for DNS records because it allows clients to resolve DNS names for applications running on that cluster. For example, an organization can have machines that connect to the public internet and then establish VPN connections for certain private IP ranges in order to connect to private IP addresses. The DNS lookups from these machines use the public DNS to determine the private addresses of those services, and then connect to the private addresses over the VPN.
1017

1118
.Procedure
1219

13-
. Review the `DNS` custom resource for your cluster:
20+
. Review the `DNS` CR for your cluster by running the following command and observing the output:
1421
+
1522
[source,terminal]
1623
----
@@ -42,22 +49,29 @@ status: {}
4249
+
4350
Note that the `spec` section contains both a private and a public zone.
4451

45-
. Patch the `DNS` custom resource to remove the public zone:
52+
. Patch the `DNS` CR to remove the public zone by running the following command:
4653
+
4754
[source,terminal]
4855
----
4956
$ oc patch dnses.config.openshift.io/cluster --type=merge --patch='{"spec": {"publicZone": null}}'
57+
----
58+
+
59+
.Example output
60+
[source,yaml]
61+
----
5062
dns.config.openshift.io/cluster patched
5163
----
5264
+
53-
Because the Ingress Controller consults the `DNS` definition when it creates `Ingress` objects, when you create or modify `Ingress` objects, only private records are created.
65+
The Ingress Operator consults the `DNS` CR definition when it creates DNS records for `IngressController` objects. If only private zones are specified, only private records are created.
5466
+
5567
[IMPORTANT]
5668
====
57-
DNS records for the existing Ingress objects are not modified when you remove the public zone.
69+
Existing DNS records are not modified when you remove the public zone. You must manually delete previously published public DNS records if you no longer want them to be published publicly.
5870
====
5971

60-
. Optional: Review the `DNS` custom resource for your cluster and confirm that the public zone was removed:
72+
.Verification
73+
74+
* Review the `DNS` CR for your cluster and confirm that the public zone was removed, by running the following command and observing the output:
6175
+
6276
[source,terminal]
6377
----

0 commit comments

Comments
 (0)