Release a new version to a subset of users, then proceed to a full rollout
4 Pods (75% vs. 25%)
spec:
replicas: 3
spec:
replicas: 1
10 replicas of version 1 is serving traffic deploy 1 replicas version 2 (meaning ~10% of traffic) wait enought time to confirm that version 2 is stable and not throwing unexpected errors scale up version 2 replicas to 10 wait until all instances are ready shutdown version 1
See Canaray-Annotations on Nginx-Ingress-Controller (nginx.ingress.kubernetes.io/canary-weight
).
- version 1 is serving traffic
- deploy version 2
- create a new "canary" ingress with traffic splitting enabled
- wait enought time to confirm that version 2 is stable and not throwing unexpected errors
- delete the canary ingress
- point the main application ingress to send traffic to version 2
- shutdown version 1
- version released for a subset of users
- convenient for error rate and performance monitoring
- fast rollback
- slow rollout
- fine tuned traffic distribution can be expensive (99% A/ 1%B = 99 pod A, 1 pod B)