Sharath Enugala

Azure - Add custom domain in AKS - Ingress

Prerequisite:

  1. − Azure AKS resource with a deployed node js service
  2. − Domain name registered with any 3rd party provider like GoDaddy

   

Steps:

  1. • Navigate to your Kubernetes service and search for Ingress and select Services and Ingresses
  2. • Click on Create and select Ingress(Preview) from dorp down
  3. • Choose a Ingress name - Ex: appname-ingress, Namespace and Service
  4. • Select an existing certificate from a key vault or create a new one(azure allows to create new one if one doesn't exist). When you create new one, make sure webapprouting-your_cluster_name is added as Key Vault Administrator for that keyvault, you can do this from KeyVault's Access Control(IAM)-> Add-> Add role assignment-> Key Vault Administrator-> Managed identity-> select Member-> User-assigned managed identity-> webapprouting-your_cluster_name
  5. • Choose 3rd Party Provider under DNS Provider and enter your domain name (Ex: for domains registered in Godaddy)
  6. • Wait for the keyvault-appname-ingress to be created under Workloads
  7. • For 3rd party DNS providers, the DNS records will have to be manually updated to match the ingress IP addresses. DNS records for domains managed through Azure DNS are updated automatically.
  8. • Open your DNS setting in your 3rd party provider website and Add a new DNS record of Type A with host as @ and value as the Ingress IP Address(can be found on the Ingress tab under Services and Ingress)

   

  1. That's it! Open your custom domain in a new tab to see your app content rendered from the AKS service.