My AKS app uses a standard ingress-nginx ingress controller with a static IP, installed via Helm chart:
myStaticIp=1.2.3.4
myNodeRg=MC_foobar_eastus
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx --create-namespace \
--set controller.ingressClassResource.default=true \
--set controller.service.loadBalancerIP=$myStaticIp \
--set controller.service.annotations.service\.beta\.kubernetes\.io/azure-load-balancer-resource-group=$myNodeRg
How can I cut over to a different static IP with zero downtime?
Updating in-place and re-running the snippet above would update the ingress controller, but users would experience a downtime during the DNS caching period.
I suppose one option is to create a second ingress controller with loadBalancerIP=<newIp>
, otherwise identical, and clean up the old one after the DNS caching window.
Just curious if there's a better way? Maybe something like a rolling update over multiple days?