How do you implement a canary deployment in Kubernetes, and how does traffic splitting actually work?
Whether you understand the mechanics of traffic splitting and automated analysis, or whether you'd just deploy two Deployments and call it a canary.
I'd reach for Argo Rollouts or Flagger rather than raw Deployments, because they wire traffic control to automated metric analysis. With Argo Rollouts I define steps (say, 5% for five minutes, 25% for ten, 50% for fifteen) and attach an AnalysisTemplate that queries Prometheus error rate and p99 latency. If either threshold breaches, the Rollout aborts and shifts all traffic back to stable within about 30 seconds. Istio VirtualService or the Gateway API HTTPRoute gives me per-request weight control underneath; with ingress-nginx retired in March 2026, an HTTPRoute is also the mesh-free path.
Weight the requests, not the replicas.
- How do you handle database schema changes alongside a canary rollout?
- What's the difference between canary and A/B testing in Kubernetes?
- How would you configure header-based routing so your team can test the canary before any percentage rollout?
In the book this question runs three pages: it adds a deep dive with a diagram, a decision framework, a pitfalls table and a worked answer to each follow-up.
