how to create multiple loadbalancer ip addresses on one ingress controller on Azure AKS

3/2/2018

I'm trying to setup multiple services on one k8s cluster, with one Ingress controller in front that does tls termination for all services. This is a good example: https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/multi-tls/multi-tls.yaml

I initially followed this example: https://github.com/brunoterkaly/ingress, and then expanded it to have multiple tls services.

By exposing my nginx replication controller AKS on Azure automatically creates a loadbalancer and a public ip address, to which I can apply an A record: kubectl expose rc nginx-ingress-rc --port="80,443" --type="LoadBalancer"

However, I also want a second A record, that points to the same ip address (I guess?), so that I can access my ingress controller from different domains. I can't figure out how to let AKS create a second one for that purpose?

-- Nicolas Mommaerts
azure
azure-aks
kubernetes-ingress
nginx

1 Answer

3/7/2018

Meanwhile I understand Ingress a bit better. Only one ip address is created for the ingress controller, which can support path and host based routing. See https://docs.microsoft.com/en-us/azure/aks/ingress for an example. I'll just need to configure my DNS with different CNAME records for the A record that is associated with the Azure public IP address. If I want to use multiple *.cloudapp.azure.com fqdn's for my services, what I was trying to achieve at first, I'll have to use Azure DNS.

-- Nicolas Mommaerts
Source: StackOverflow