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
. 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:
51
54
+
52
55
[source,terminal]
53
56
----
54
57
$ az network dns zone list --resource-group "${RESOURCE_GROUP}"
55
58
----
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
+
56
67
57
68
. Create a YAML file, for example, `external-dns-sample-azure.yaml`, that defines the `ExternalDNS` object:
58
69
+
59
70
.Example `external-dns-sample-azure.yaml` file
71
+
+
60
72
[source,yaml]
61
73
----
62
74
apiVersion: externaldns.olm.openshift.io/v1beta1
@@ -74,20 +86,26 @@ spec:
74
86
type: OpenShiftRoute <6>
75
87
----
76
88
<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`.
78
90
<3> Defines the provider type.
79
91
<4> You can define options for the source of DNS records.
80
92
<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.
81
93
<6> Defines the `route` resource as the source for the Azure DNS records.
82
94
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:
84
100
+
85
101
[source,terminal]
86
102
----
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
88
104
----
89
105
+
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
0 commit comments