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
Keep the v1 Deployment at 9 replicas and add a v2 Deployment with 1 replica, both with Pod label app: shop (plus a track label to tell them apart).
track
Add the annotation traffic-weight: "10" to the v2 Deployment.
traffic-weight: "10"
Give v2 the label app: shop-v2 and run 1 replica of it.
app: shop-v2
Add track: stable to the Service selector, then create a v2 Deployment labelled app: shop, track: canary.
track: stable
app: shop, track: canary