Azure - Add custom domain in AKS - Ingress
Prerequisite:
- − Azure AKS resource with a deployed node js service
- − Domain name registered with any 3rd party provider like GoDaddy
Steps:
- • Navigate to your Kubernetes service and search for Ingress and select Services and Ingresses
- • Click on Create and select Ingress(Preview) from dorp down
- • Choose a Ingress name - Ex: appname-ingress, Namespace and Service
- • 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
- • Choose 3rd Party Provider under DNS Provider and enter your domain name (Ex: for domains registered in Godaddy)
- • Wait for the keyvault-appname-ingress to be created under Workloads
- • 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.
- • 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)
- That's it! Open your custom domain in a new tab to see your app content rendered from the AKS service.