One web app. Six strategies. Real-world settings.
A cloud-native project that demonstrates six mainstream Kubernetes deployment strategies on a single AKS cluster.
View on GitHubDeployment is a critical process: it makes an application available in a live environment and delivers business value.
How does a team select the right deployment method for a given requirement?
This project:
Infrastructure Architecture
Kubernetes Components
Incrementally replaces old pods with new ones via maxSurge and maxUnavailable, keeping the service available throughout the rollout.
Pros:
Cons:
Common use cases:
Gradually replaces older versions of an application with new ones.
Zero downtime from V1.0.0 to V1.1.0.
Terminates all existing pods before starting the new version, producing a brief service outage during the switch.
Pros:
Cons:
Common use cases:
Terminates all existing pods before starting the new version.
Experiences downtime from V2.0.0 to V2.1.0: "no healthy upstream".
Progressively shifts a small percentage of live traffic to the new version, increasing the weight in stages while monitoring health before full promotion.
Pros:
Cons:
Common use cases:
Rollout controlled by setting weight.
Traffic splits from 25% to 50% to 100%.
Runs two identical environments — blue (current) and green (new) — and cuts all traffic over at once after the green environment passes validation.
Pros:
Cons:
Manual promotion, traffic flip, old version auto-removed.
Header-based request gets the preview version; active request gets the stable version.
The moment traffic flips, from V4.0.0 to V4.1.0.
Routes specific user segments to different versions based on request attributes (headers, cookies, geography) rather than random weights, so behavior can be compared under matched conditions.
Use cases:
Canary rollout ensures progressive deployment; Istio splits traffic 50/50 for A/B testing.
Header-based request hits the preview version; stable traffic hits both versions randomly.
Mirrors a copy of live production traffic to the new version while responses are discarded, so the candidate is exercised with real workload without affecting users.
Use cases:
Rollout of 2 pods to handle mirrored traffic.
Stable traffic shows stable version V6.0.0; canary pod log confirms traffic gets mirrored.
Stable:canary ~= 50/50 confirms traffic is being mirrored.
Use decision tree to choose the right deployment strategy for release.
Deployment strategy decision tree.