Professional Documents
Culture Documents
Kubernetes Deployment Strategies
Kubernetes Deployment Strategies
Solutions
6 KUBERNETES
DEPLOYMENT STRATEGIES
by Etienne Tremel
By Etienne Tremel, software engineer at Container Solutions
to a full rollout.
specific condition.
• Shadow: Version B receives real-world traffic alongside version
Let’s take a look at each strategy and see which strategy would fit
best for a particular use case. For the sake of simplicity, we used
1. 2. 3.
Pros:
• Easy to setup.
Cons:
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/recreate
Ramped - slow rollout
other until all the instances are rolled out. It usually follows the
accept traffic, the instance is added to the pool. Then, one instance
deployment time:
roll out.
current amount.
4. 5.
Pros:
of the data.
Cons:
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/ramped
Blue/Green - best to avoid API
versioning issues
(blue) with exactly the same amount of instances. After testing that
the new version meets all the requirements the traffic is switched
1. 2.
3. 4.
Pros:
• Instant rollout/rollback.
one go.
Cons:
releasing to production.
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/blue-green
Canary - let the consumer do the
testing
10 percent go to version B.
This technique is mostly used when the tests are lacking or not
1. 2.
3. 4.
Pros:
• Fast rollback.
Con:
• Slow rollout.
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/canary
A/B testing - best for feature
testing on a subset of users
• By browser cookie
• Query parameters
• Geolocalisation
system, etc.
• Language
1. 2.
3. 4.
Pros:
Cons:
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/ab-testing
Shadow
1. 2.
3. 4.
This technique is fairly complex to setup and needs special
service you can end-up having customers paying twice for their
Pros:
Cons:
• Complex to setup.
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/
master/shadow
To Sum Up
Last but not least, a shadow release is complex and requires extra
www.container-solutions.com