1

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?

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
Alvin
  • 8,219
  • 25
  • 96
  • 177

3 Answers3

5

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.

Mohit_Garg
  • 892
  • 5
  • 8
5

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

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.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • Does static public IP via azure portal support https? – Alvin Nov 21 '17 at 13:05
  • NO, azure load balancer does not support HTTPS, if you want to use HTTPS, maybe you should use Nginx – Jason Ye Nov 21 '17 at 13:09
  • @Alvin here a case about how to use [nginx Ingress](https://stackoverflow.com/questions/44812199/accessing-docker-container-over-https-on-azure-subdomain/44818751#44818751) to enable https for ACS, please refer to it. hope this helps:) – Jason Ye Nov 22 '17 at 09:58
  • 1
    @Alvin Please let me know if you need more help:) – Jason Ye Nov 27 '17 at 09:00