Unable to route traffic to canary release using nginx ingress rule with canary annotation and 100 % weight Unable to route traffic to canary release using nginx ingress rule with canary annotation and 100 % weight kubernetes kubernetes

Unable to route traffic to canary release using nginx ingress rule with canary annotation and 100 % weight


You need to perform below before you delete the pods in namespace A.

  1. Delete the canary ingress
  2. Point the main application ingress to send traffic to new version.

As described here when you remove pods the endpoints change and endpoints change neither recreate a new nginx.conf file nor reloads it. Rather new list of endpoints sent to a Lua handler running inside Nginx using HTTP POST request. You can check the logs of Lua handler to verify that.In a relatively big clusters with frequently deploying apps this feature saves significant number of Nginx reloads which can otherwise affect response latency, load balancing quality (after every reload Nginx resets the state of load balancing) and so on.When you create a new ingress then it will change nginx.conf and reload it.This should explain why no change in nginx.conf.