The idea
Users send requests to a load balancer, which spreads them over four pods running version 1. A pod is one running copy of the app. Shipping version 2 means replacing those pods. A deployment strategy is the plan for that swap.
Recreate and rolling
The simplest plan stops every v1 pod, then starts the v2 pods. Kubernetes calls it Recreate. Until v2 is ready, nothing can answer, so users get errors: downtime. Teams pick it when v1 and v2 cannot run side by side.
Kubernetes' default is a rolling update. With maxSurge: 1 it starts one extra v2 pod. Only when its readiness probe (a health check) passes does it get traffic; TO V2 shows v2's share of ready pods. Then one v1 pod stops, and the cycle repeats.
Repeat until every pod runs v2. With maxUnavailable: 0, four pods are always ready, and Kubernetes never runs more than one extra pod beyond the four (a stopping pod may linger briefly while it shuts down). Both versions answer, so v2 must work beside v1.
Blue-green
Blue-green keeps the live fleet (blue, v1) and starts a complete copy with the new version (green, v2) beside it. Green gets no users yet, so the team can test it in place. Eight pods: double the capacity, for a while.
When green passes its checks, the load balancer switches in one move: route(100). Every new request now goes to v2. Nobody sees a mix: before the flip everyone gets v1, after it everyone gets v2.
Blue is still running. If green starts failing, one flip back, route(0), restores v1 in seconds without starting a single pod. The broken green is then removed and fixed. Had it been healthy, blue would be removed instead.
Canary
A canary release starts one v2 pod and sends it a small share of real traffic, here 10% with route(10). Miners once carried canaries to warn of bad air. Only 1 request in 10 risks the new code.
The team compares the canary with v1 on the golden signals, such as errors and latency. Here the canary's error rate jumps, so they set route(0) and remove it. Only about 10% of requests ever met the bug.
If the canary looks as healthy as v1, its share grows in stages, 10% then 50% then 100%, with a pause to watch the numbers at each one. v1 pods are removed as v2 takes over.
Choosing
Rolling needs no spare fleet but mixes versions and undoes slowly. Blue-green costs double for a while but switches and undoes at once. Canary limits the damage of a bug but needs weighted routing and good monitoring.
What happens
;; step 1/11 · idea
users → load balancer → 4 pods (v1)
pod = one running copy of the app
(one or more containers)
goal: v1 → v2 with no one noticing
strategy = which pods run when,
and who gets which version
A plain Kubernetes Service spreads requests over all ready pods (kube-proxy in iptables mode picks one at random), so in a rolling update v2's share follows the pod count. An exact weight such as 10% needs weighted routing: an ingress controller, a service mesh or a tool such as Argo Rollouts. The blue and green rows are only places to draw old and new pods. In a rolling update Kubernetes does not keep two named fleets; it replaces pods in one Deployment.