azurednsipfqdn

More than one FQDN or DNS for Azure Public IP


is it possible to have more than one DNS from AZURE running on a public Azure IP at a time ?

I understand the comamnd is

az network public ip update

in my case

az network public-ip update --ids *** --dns-name b***y-test5
az network public-ip update --ids *** --dns-name b***y-test5-io

But if i run one, the other one will be inaccessible in a short time. I need this for Kubernetes routing with ingress on different services.

Is ther any way to register both ?


Solution

  • The command az network public-ip update only updates with one DNS name. If you want two DNS names for one service, you could use another alias via adding a CNAME record.

    If so, you need a public domain such ascontoso.com, you could add a CNAME record to your domain's DNS record. For example, add a CNAME named www that maps to the Azure created DNS name like vm.centralus.cloudapp.azure.com for your service in the DNS zone in your domain provider. If so, you will access the public IP address via two DNS names vm.centralus.cloudapp.azure.com and www.contoso.com.

    Additionally, you could optionally host your domain in Azure DNS and configure its records in Azure.