sigs.k8s.io/cluster-api-provider-azure@v1.14.3/docs/book/src/topics/custom-dns.md (about) 1 # Custom Private DNS Zone Name 2 3 It is possible to set the DNS zone name to a custom value by setting `PrivateDNSZoneName` in the `NetworkSpec`. By default the DNS zone name is `${CLUSTER_NAME}.capz.io`. 4 5 *This feature is enabled only if the `apiServerLB.type` is `Internal`* 6 7 ```yaml 8 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 9 kind: AzureCluster 10 metadata: 11 name: cluster-example 12 namespace: default 13 spec: 14 location: southcentralus 15 networkSpec: 16 privateDNSZoneName: "kubernetes.myzone.com" 17 vnet: 18 name: my-vnet 19 cidrBlocks: 20 - 10.0.0.0/16 21 subnets: 22 - name: my-subnet-cp 23 role: control-plane 24 cidrBlocks: 25 - 10.0.1.0/24 26 - name: my-subnet-node 27 role: node 28 cidrBlocks: 29 - 10.0.2.0/24 30 apiServerLB: 31 type: Internal 32 frontendIPs: 33 - name: lb-private-ip-frontend 34 privateIP: 172.16.0.100 35 resourceGroup: cluster-example 36 37 ``` 38 # Manage DNS Via CAPZ Tool 39 40 Private DNS when created by CAPZ can be managed by CAPZ tool itself automatically. To give the flexibility to have BYO 41 as well as managed DNS zone, an enhancement is made that causes all the managed zones created in the CAPZ version before 42 the enhancement changes to be treated as unmanaged. The enhancement is captured in PR 43 [1791](https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/1791) 44 45 To manage the private DNS via CAPZ please tag it manually from azure portal. 46 47 Steps to tag: 48 49 - Go to azure portal and search for `Private DNS zones`. 50 - Select the DNS zone that you want to be managed. 51 - Go to `Tags` section and add key as `sigs.k8s.io_cluster-api-provider-azure_cluster_<clustername>` and value as 52 `owned`. (Note: clustername is the name of the cluster that you created)