Reputation: 6421
Suppose there is a version 1.0 of the web application running in production. You want to deploy new version 2.0 side by side of the production version 1.0. You want to route traffic from subset of users/customers to the new version. In other words, how to achieve real canary releases (as defined by this article) for web based applications on Kubernetes.
Kubernetes documentation talks about canary deployments but there is no mention about how to achieve user based routing. Is it possible to implement sticky load balancing based on cookie with the existing load balancing support provided by Kubernetes.
Upvotes: 0
Views: 284
Reputation: 20768
Canary deployment on Kubernetes involve deploying Pods of the same App but of different versions: if you have 5 Pods for an App for example, one of them could be a new version, and 1/5 of your traffic would be directed to this new version.
To achieve user based canary deployment, you could use sticky sessions on your Service, with
sessionAffinity: ClientIP
That will insure that when a client connected, it will always end up on the same Pod (if the IP remains the same)
I don't think there is a 'cookie' based way to assign traffic.
Upvotes: 0