Canary Releases with Labels
Service shop selects app: shop. You want roughly 10% of traffic to go to version 2 using only core Kubernetes objects. Which setup works?
shop
app: shop
Choose one answer
Run v1 with 9 replicas and v2 with 1 replica, both with Pod label app: shop and a track label to tell them apart.
track
Annotate the v2 Deployment with service.kubernetes.io/weight: "10" and keep 1 replica.
service.kubernetes.io/weight: "10"
Run 1 replica of v2 labelled app: shop-v2, and change the Service's selector to a list that includes both app: shop and app: shop-v2.
app: shop-v2
selector
Add track: stable to the Service selector and run a v2 Deployment labelled track: canary.
track: stable
track: canary