When running Kubernetes in Azure, one of the biggest time-savers you can implement is automatic DNS record management—especially for internal (private) services. By integrating setup steps). If you haven’t created your Private DNS zone yet, you can do so quickly: Then, link it to your Virtual Network so internal DNS can be resolved: Replace This command returns JSON that includes an Note: The Azure Workload Identity is GA (generally available), so you don’t need to enable any preview features. However, you do need to install the necessary components in your cluster. Follow the or manually configure a federated identity in your managed identity. Below is an example of a Happy Automating and may your internal DNS always resolve! 🎉 Happy Clustering ! 🌟
External-DNS Helm chart or YAML files ready to deploy.
Setting Up Azure Private DNS
az network private-dns zone create \
--resource-group <RESOURCE_GROUP> \
--name example.internal
az network private-dns link vnet create \
--resource-group <RESOURCE_GROUP> \
--zone-name example.internal \
--name myVnetLink \
--virtual-network <VNET_ID> \
--registration-enabled false
<RESOURCE_GROUP> and <VNET_ID> with values for your environment.
Create a User-Assigned Managed Identity (UAMI) 🔑
Create the UAMI
az identity create \
--name external-dns-identity \
--resource-group <RESOURCE_GROUP> \
--location <LOCATION>
id and a clientId (important for later steps).
Assign the Role
Give the identity DNS Zone Contributor on your DNS zone resource group or at the subscription level:
az role assignment create \
--assignee <CLIENT_ID_OF_UAMI> \
--role "DNS Zone Contributor" \
--scope /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>
clientId is also referred to as the “Application ID” of the managed identity.
Enable Azure Workload Identity on Your Cluster
The values.yaml Snippet Explained
values.yaml you could use with the
Automating DNS in Azure Private DNS with External-DNS ☁️🔐
- ▸ Why Use Azure Workload Identity?
- ▸ Prerequisites Checklist ✅
- ▸ Setting Up Azure Private DNS
- ▸ Create a User-Assigned Managed Identity (UAMI) 🔑
- ▸ Enable Azure Workload Identity on Your Cluster
- ▸ The values.yaml Snippet Explained
- ↳ Key Sections Breakdown
- ▸ Deploying External-DNS via Helm 🏗️
- ▸ Example: Creating an Ingress
- ▸ Validation and Troubleshooting 🏷️
- ▸ Wrapping Up 🎁
- ↳ Key Takeaways**
- ↳ Further Reading
SOCIAL SHARE CARD GENERATOR