Interview Prep/Kubernetes/Deployments and rollouts

How would you do a canary release with only Deployments and a Service?

IntermediateScenarioDeployments and rollouts
Answer

Situation read → You want 10% of traffic on the new version without Argo Rollouts or a mesh.

What I'd do →

  1. Create app-stable with 9 replicas and app-canary with 1 replica, both carrying app: web
  2. The Service selects only app: web, so traffic splits roughly by pod count
  3. Watch error rate and latency of the canary pods in Prometheus
  4. Scale the canary up and the stable down in steps, or delete the canary on failure
  5. Finish by updating the stable image and removing the canary

Why → kube-proxy balances across all ready endpoints, so replica ratio approximates traffic ratio. It is coarse, but needs no extra tooling.

Interview tip → Say that for exact percentages or header routing you would use Argo Rollouts, Flagger, or Gateway API weights.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts