1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OCPBUGS-32058 Azure Private DNS zone command addition

This commit is contained in:
jmanthei
2025-09-25 10:19:09 -05:00
committed by openshift-cherrypick-robot
parent a6d72f13ae
commit 39fa548815
2 changed files with 29 additions and 11 deletions

View File

@@ -4,9 +4,9 @@
:_mod-docs-content-type: PROCEDURE
[id="nw-control-dns-records-public-hosted-zone-azure_{context}"]
= Creating DNS records on an Azure public DNS zone
= Creating DNS records on an Azure DNS zone
You can create DNS records on a public DNS zone for Azure by using the External DNS Operator.
You can create Domain Name Server (DNS) records on a public or private DNS zone for Azure by using the External DNS Operator.
.Prerequisites
@@ -41,22 +41,34 @@ $ oc get routes --all-namespaces | grep console
----
+
.Example output
+
[source,terminal]
----
openshift-console console console-openshift-console.apps.test.azure.example.com console https reencrypt/Redirect None
openshift-console downloads downloads-openshift-console.apps.test.azure.example.com downloads http edge/Redirect None
----
. Get a list of DNS zones by running the following command:
. Get a list of DNS zones.
+
.. For public DNS zones by running the following command:
+
[source,terminal]
----
$ az network dns zone list --resource-group "${RESOURCE_GROUP}"
----
+
.. For private DNS zones by running the following command:
+
[source,terminal]
----
$ az network private-dns zone list -g "${RESOURCE_GROUP}"
----
. Create a YAML file, for example, `external-dns-sample-azure.yaml`, that defines the `ExternalDNS` object:
+
.Example `external-dns-sample-azure.yaml` file
+
[source,yaml]
----
apiVersion: externaldns.olm.openshift.io/v1beta1
@@ -74,20 +86,26 @@ spec:
type: OpenShiftRoute <6>
----
<1> Specifies the External DNS name.
<2> Defines the zone ID.
<2> Defines the zone ID. For a private DNS zone, change `dnszones` to `privateDnsZones`.
<3> Defines the provider type.
<4> You can define options for the source of DNS records.
<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.
<6> Defines the `route` resource as the source for the Azure DNS records.
. Check the DNS records created for {product-title} routes by running the following command:
.Troubleshooting
. Check the records created for the routes.
+
.. For public DNS zones by running the following command:
+
[source,terminal]
----
$ az network dns record-set list -g "${RESOURCE_GROUP}" -z test.azure.example.com | grep console
$ az network dns record-set list -g "${RESOURCE_GROUP}" -z "${ZONE_NAME}" | grep console
----
+
[NOTE]
====
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.
====
.. For private DNS zones by running the following command:
+
[source,terminal]
----
$ az network private-dns record-set list -g "${RESOURCE_GROUP}" -z "${ZONE_NAME}" | grep console
----

View File

@@ -13,5 +13,5 @@ You can create DNS records on Azure by using the External DNS Operator.
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.
====
// Creating DNS records on an Azure public DNS zone
// Creating DNS records on an Azure DNS zone
include::modules/nw-control-dns-records-public-hosted-zone-azure.adoc[leveloffset=+1]