DNS record mapping the hostnames and the external IP - azure

So I'm deploying this app called WSO2 API Manager to AKS and at the end of the tutorial it asks me to do this :
If the defined hostnames (in the previous step) are backed by a DNS
service, add a DNS record mapping the hostnames and the external IP
(EXTERNAL-IP) in the relevant DNS service.
So I don't know where to go from here, because if I map the DNS to the IP in the hosts file, the app works no problemo.
But I'm on AKS, if someone could guide me through doing the equivalent over there, I would be grateful.

For a DNS to work through the internet you need to properly configure it. If your DNS name is abc.com, first you need to purchase "abc.com" domain through a domain registrar. Then it should be mapped to the public IP of your Ingress. You can use Azure DNS for this. Refer to the following.
https://learn.microsoft.com/en-us/azure/dns/
https://learn.microsoft.com/en-us/azure/dns/dns-getstarted-portal

Related

Configure custom DNS for Public IP Address

i created VM behide Azure Load Balancer. i want to use custom domain to Load Balance Public IP. for example i want to access url like 'xx.mvg.com' instead Load Balance Public IP from internet. how i can do it?
i tried to did followed reference link 'https://learn.microsoft.com/en-us/azure/dns/dns-custom-domain' but still not working.
Please recommend how to register my domain name i wish, i want map my domain name to my application running on VM behide Azure Load Balancer.
and Azure have service about internet domain registrar?
about your last question - no, Azure have only Azure DNS, which is not a domain registrar, but a DNS as a service.
Easiest way to achieve what you want - assign a dns name to a public ip (called dns label here) and create a CNAME record in your DNS for that DNS name. or just straight up create a A record in your DNS and point it to your public ip.

How to have domain for Azure VM

I did a research a few days about this. But still do not find any solution yet.
I have vm that host a website. The IP address for this website able to access from outside. But now i want to have custom domain for this vm.
Anyone know where I should refer to? Please share any link etc.
just create a A DNS record with your domain name registar, or use Azure DNS (you would need to delegate your domain to Azure DNS), or use Azure built-in DNS for your VM. If you dont have a domain - you need to buy it first.
https://serverfault.com/questions/143411/godaddy-linking-domain-name-to-ip-address
After you deployed an Azure VM, you also could configure an FQDN for this VM so that you can access the VM via Azure Provided DNS resolution which is mapped to the public IP address of Azure VM. Read how to create a FQDN. If so, you could directly access the VM via this FQDN.
Otherwise, you need to purchase a domain then use a CNAME to redirect your custom domain like www.example.com to this FQDN or use a A record mapping to the public IP address in your domain provider.

DNS routing to private IP

We have 1 virtual machine with IIS in Azure, it doesn't hold the public IP address.
Its FQDN is machine.domain.local.
Its serving a service from IIS. We want to install certificate. However, we got the SSL by name service.domain.com.
If my machine would have public IP address I would have created A record for service.domain.com pointing to machines public IP address.
But we want this service to run internally, how we can we achieve this routing?
Any suggestions?
you can make a CNAME record to map service.domain.com bind to machine.domain.local
The question is not Azure or DNS related, it looks like its IIS/certificate related.
You got certificate for service.domain.com, which you want to apply to website machine.domain.local.
You either get machine.domain.local added to CName on Certificate or change IIS website domain to service.domain.com
You can use IIS to generate a self-signed certificate. Then, use an Azure Site-to-Site or Express Route to connect to On-premise. Set up a local host file entry on the servers for that domain & private IP address. This would work without a flaw but, it's tedious and not much of a recommended design.
What I would do is, I would MAP my domain to the private IP within the local DNS server and set the DNS as custom DNS on the VNET. This will make sure that all the VM's will point to the DNS server for any query and then start a recursive query.
MAP to Private IP
Make record entry with the local DNS server with Private IP
Make changes at the Azure VNET to use the custom DNS, provide the DNS server private IP
Else
Do a host file entry manually on all the servers.
You can also read more along the lines of Private DNS on Azure:
https://azure.microsoft.com/en-in/blog/azure-dns-private-zones-now-available-in-public-preview/
Regards,
Charan

Can an Azure NIC be pointed to records one created in an Azure DNS zone?

Is there a way to point an Azure NIC to the records one created in an Azure DNS zone?
At present Azure DNS doesn't support private DNS zones, i.e. those only available to your vnet. Also, the DNS servers specified in the "Add DNS server" box needs to be a recursive resolver, Azure DNS is an Authoritative DNS service, i.e. it will only serve answers for the zones it hosts.
We can't add Azure DNS zone to NIC custom DNS. The custom DNS required IP address, we can add the DNS server IP address to it.
For example, we can add 8.8.8.8 to it, also we can add local DNS server IP address to it(need VPN). Or create a Azure windows VM and install DNS role on it, and add this VM ip address to it.
If you want to use Azure DNS zone to manage your records, we can map your own domain name to DNS zone, and add name servers to your domain name(add this by domain name registrar manage webpage).
The following image shows an example DNS query about Azure DNS zone:
If you want to add record to DNS zone, and you want to map your 3rd party domain name map to Azure DNS zone, we can follow those steps in that answer.
Note:
Keep in mind Azure DNS is not the domain registrar, we should buy domain name from domain registrar(like godaddy, register.com).
Update:
If you just want to use domain name in your virtual network, there is no need to buy a domain, we can use AAD DS in our virtual network. Or we can deploy a VM and install DC on it, work as on-prem.
By the way, in the same virtual network, we can ping VM's name by default.

Google cloud DNS record set doesn't work

I have a back-end service on Google cloud, which I access through a Google cloud load-balancer with a static IP for front-end and port 80 (do not get any ideas, I am a developer with very basic knowledge of networking).
For accessing this service through a domain name (as a sub-domain of apps.googleusercontent.com, not custom domain), I created a zone (in cloud DNS) and then an A-Type record set with the IP of the load balancer. I get a 404 (google 404 page) on this new Domain.
I did a nslookup on new domain name and the IP returned was different than the loadbalancer IP. NSLookup returned another IP when I tried again after 30 minutes.
Is this the right way to setup the domain?
P.S. The back-end is a Kubernetes service.
For creating zone, I used this DNS suffix : apps.googleusercontent.com
The "apps.googleusercontent.com" domain is a generic domain owned by Google. You aren't supposed to be able to modify the IP of it.
When you running a "Nslookup" on the domain name it is returning an IP of Google. That's why when you try to access through the load balancer IP directly it works.
You should add an CNAME record that point to your custom domain to the domain .

Resources