How to give cluster IP as a Valid Url name or DNS name using Azure?

4/13/2020

I have created the k8s cluster with ingress enabled using helm chart. I would like to resolve my cluster IP with specific name using azure.

Please find the below scenerios for cluster :  

1. k8s clsuter name: deb-aks
2. k8s dns prefix : dev-aks-dns
3. Ingress enabled using helm chart.
4. Cluster IP : 13.72.186.11
5. I would like to change the IP address i.e. mentioned above to some url like http://devaks.work.com/[Ingress Routes]
6. How can give that name to resolve IP address ?
7. Pltaform : Aure Kubernetes, NgInx using helm, ACR.
-- Sachin Mishra
azure
azure-dns
azure-kubernetes
kubernetes-helm
nginx-ingress

1 Answer

4/14/2020

you will need to install external-dns

Chart: https://github.com/bitnami/charts/tree/master/bitnami/external-dns

This will allow you to set an annotation on your nginx ingress controller Service (or create a CRD dnsendpoints) which will tie the Public IP you are getting on your Load Balancer service type with a DNS entry of your choice.

You will need to own a domain/zone and configure your Internal DNS chart to be able to configure your DNS of choice.

Here's a list of supported DNS provider the external-dns supports: https://github.com/kubernetes-sigs/external-dns#the-latest-release-v06

Here's a full example on how to use external-dns with Azure Zones: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/azure.md

-- djsly
Source: StackOverflow