Kubernetes - Advanced Deployment Patterns
Given this snippet of a Kubernetes Deployment YAML for canary rollout, what percentage of traffic will go to the canary pods?
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-canary
labels:
version: canary
spec:
replicas: 2
selector:
matchLabels:
app: myapp
version: canary
template:
metadata:
labels:
app: myapp
version: canary
spec:
containers:
- name: myapp
image: myapp:v2
Assuming the stable deployment has 8 replicas with label version: stable and the Service routes traffic evenly by label.