Skip to content

Commit b8a60eb

Browse files
committed
OCPBUGS-32058 Azure Private DNS zone command addition
1 parent 46bdb97 commit b8a60eb

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

modules/nw-control-dns-records-public-hosted-zone-azure.adoc

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="nw-control-dns-records-public-hosted-zone-azure_{context}"]
7-
= Creating DNS records on an Azure public DNS zone
7+
= Creating DNS records on an Azure DNS zone
88

9-
You can create DNS records on a public DNS zone for Azure by using the External DNS Operator.
9+
You can create Domain Name Server (DNS) records on a public or private DNS zone for Azure by using the External DNS Operator.
1010

1111
.Prerequisites
1212

@@ -41,22 +41,34 @@ $ oc get routes --all-namespaces | grep console
4141
----
4242
+
4343
.Example output
44+
+
4445
[source,terminal]
4546
----
4647
openshift-console console console-openshift-console.apps.test.azure.example.com console https reencrypt/Redirect None
4748
openshift-console downloads downloads-openshift-console.apps.test.azure.example.com downloads http edge/Redirect None
4849
----
4950

50-
. Get a list of DNS zones by running the following command:
51+
. Get a list of DNS zones.
52+
+
53+
.. For public DNS zones by running the following command:
5154
+
5255
[source,terminal]
5356
----
5457
$ az network dns zone list --resource-group "${RESOURCE_GROUP}"
5558
----
59+
+
60+
.. For private DNS zones by running the following command:
61+
+
62+
[source,terminal]
63+
----
64+
$ az network private-dns zone list -g "${RESOURCE_GROUP}"
65+
----
66+
5667

5768
. Create a YAML file, for example, `external-dns-sample-azure.yaml`, that defines the `ExternalDNS` object:
5869
+
5970
.Example `external-dns-sample-azure.yaml` file
71+
+
6072
[source,yaml]
6173
----
6274
apiVersion: externaldns.olm.openshift.io/v1beta1
@@ -74,20 +86,26 @@ spec:
7486
type: OpenShiftRoute <6>
7587
----
7688
<1> Specifies the External DNS name.
77-
<2> Defines the zone ID.
89+
<2> Defines the zone ID. For a private DNS zone, change `dnszones` to `privateDnsZones`.
7890
<3> Defines the provider type.
7991
<4> You can define options for the source of DNS records.
8092
<5> If the source type is `OpenShiftRoute`, you can pass the OpenShift Ingress Controller name. External DNS selects the canonical hostname of that router as the target while creating CNAME record.
8193
<6> Defines the `route` resource as the source for the Azure DNS records.
8294

83-
. Check the DNS records created for {product-title} routes by running the following command:
95+
.Troubleshooting
96+
97+
. Check the records created for the routes.
98+
+
99+
.. For public DNS zones by running the following command:
84100
+
85101
[source,terminal]
86102
----
87-
$ az network dns record-set list -g "${RESOURCE_GROUP}" -z test.azure.example.com | grep console
103+
$ az network dns record-set list -g "${RESOURCE_GROUP}" -z "${ZONE_NAME}" | grep console
88104
----
89105
+
90-
[NOTE]
91-
====
92-
To create records on private hosted zones on private Azure DNS, you need to specify the private zone under the `zones` field which populates the provider type to `azure-private-dns` in the `ExternalDNS` container arguments.
93-
====
106+
.. For private DNS zones by running the following command:
107+
+
108+
[source,terminal]
109+
----
110+
$ az network private-dns record-set list -g "${RESOURCE_GROUP}" -z "${ZONE_NAME}" | grep console
111+
----

networking/networking_operators/external_dns_operator/nw-creating-dns-records-on-azure.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ You can create DNS records on Azure by using the External DNS Operator.
1313
Using the External DNS Operator on a {entra-first}-enabled cluster or a cluster that runs in {azure-full} Government (MAG) regions is not supported.
1414
====
1515

16-
// Creating DNS records on an Azure public DNS zone
16+
// Creating DNS records on an Azure DNS zone
1717
include::modules/nw-control-dns-records-public-hosted-zone-azure.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)