- Azure CLI and terraform installed locally
- Pre-configure DNS servers outside of AKS VNet
- Forward AKS cluster FQDN
azmk8s.io
(or only private cluster FQDNprivatelink.<region>.azmk8s.io
) to Azure DNS168.63.129.16
- Get the DNS servers IP address, which would be set in
custom_dns
on next section - Get the DNS server's VNet resource ID, which would be set in
custom_dns_vnet_id
on next section
Refer dns-server for example configuration with bind.
Modify the required parameters in variables.tf, which include:
- resource_group_name
- cluster_name
- custom_dns
- custom_dns_vnet_id
- client_id
- client_secret
Then run the terraform command to deploy private cluster:
terraform init
terraform apply