1
votes

I am currently using Azure AKS.

I have a frontend application which is using LoadBalancer to have a public IP to access the service.

Should I just direct my domain name to the public IP address?

Because the IP is dynamic, if the port is destroy and recreate again, a new IP is generated.

Should I use Ingress/Nginx controller to manage the IP?

3

3 Answers

5
votes

You can use A record points to the external IP address.

You can change the public IP address to static via Azure portal, in this way, restart the service will not change the IP.

But in Azure, if we delete the Azure AKS, the Public IP address will collected by Azure platform, and we will lose this IP address.

5
votes

You can use kubernetes-incubator/external-dns to automatically update the A record in your Azure DNS zone with the (dynamic) IP of the Azure Loadbalancer or Ingress controller. Read here how to set up.

You're not limited to use Azure DNS, you could use other providers to, in v0.4: Google CloudDNS, AWS Route 53, AzureDNS, CloudFlare, DigitalOcean, DNSimple, Infoblox

1
votes

Should I just direct my domain name to the public IP address?

As Mohit said, we can set static public IP via Azure portal, and map your domian name to that Public IP address.

Because the IP is dynamic, if the port is destroy and recreate again, a new IP is generated.

By default, AKS expose pods to internet will create a Kubernetes service, the Public IP address work for that service.

If one pod was not work(multiple pods), AKS will create another pod in your service and that will not get a new public IP. But if you only have one pod in that service and re-create that pod, we will get a new Public IP address.

For now, Azure does not support to keep the public IP address for AKS service.

Hope this helps.