-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero downtime upgrade without race conditions #6105
Comments
I went ahead and did step 2 |
Thanks for sharing your steps. This stable/nginx-ingress to kubernetes/ingress-nginx move is really not well supported 👎 |
Very interesting feedback @calvinbui The doc state that
There is also a reference to zero-downtime in this doc https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#service-upstream
Is this really possible to migrate without downtime ? |
With my experience on EKS, no it's not possible. There's always a minute or so of downtime as it sorts itself out and does leader election etc. This is even with two replicas. I played around with the pre-stop command from their docs on the Helm Chart (https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx#upgrading-with-zero-downtime-in-production) and still had some the minute or so of downtime. The only method that works is to do create two ingress classes and flip the DNS. This is a pain of course and I wish I knew how I could do a rolling upgrade instead. |
I have a feeling this could be related to the AWS NLB based on this PR #5855 |
I'm following the guide on migrating helm stable/nginx-ingress to kubernetes/ingress-nginx with zero downtime.
I'm having is race condition between the old and new controllers repeatedly updating the existing ingresses. This was bound to happen but it was never mentioned in the steps or its linked guides.
I've tried setting the
ingress-class
to another value on the new controller (i.e.nginx-new
) and this prevents the race condition. ✅The problem now is if I update the
ingress-class
annotation tonginx-new
on an ingress, the address will change and traffic to the old controller is 404'd as DNS was not updated. This is also expected.I'm assuming the doc is out of date or not working. What would be the best way to do a zero-downtime deployment when there are race conditions?
My guesses are:
nginx
andnginx-new
). The problem here is I don't know if it is possible to serve one ingress with two controllers.Or alternatively,
The text was updated successfully, but these errors were encountered: