5 Deployment strategies

 

This chapter covers

  • Understanding why ReplicaSet is not a good fit for GitOps
  • Understanding why Deployment is declarative and a good fit for GitOps
  • Implementing blue-green deployment using native Kubernetes resources and Argo Rollouts
  • Implementing canary deployment using native Kubernetes resources and Argo Rollouts
  • Implementing progressive delivery using Argo Rollouts

In the previous chapters, we have focused on the initial deployment of Kubernetes resources. Launching a new application can be as simple as deploying a ReplicaSet with the desired number of Pod replicas and creating a Service to route the incoming traffic to the desired Pods. But now imagine you have hundreds (or thousands) of customers sending thousands of requests per second to your application. How do you safely deploy new versions of your application? How can you limit the damage if the latest version of your application contains a critical bug? In this chapter, you will learn about the mechanisms and techniques that can be used with Kubernetes to implement multiple different deployment strategies that are critical to running applications at enterprise or internet scale.

We recommend you read chapters 1, 2, and 3 before reading this chapter.

5.1 Deployment basics

5.1.1 Why ReplicaSet is not a good fit for GitOps

5.1.2 How Deployment works with ReplicaSets

5.1.3 Traffic routing

5.1.4 Configuring minikube for other strategies

5.2 Blue-green

5.2.1 Blue-green with Deployment

5.2.2 Blue-green with Argo Rollouts

5.3 Canary

5.3.1 Canary with Deployment

5.3.2 Canary with Argo Rollouts

5.4 Progressive delivery

5.4.1 Progressive delivery with Argo Rollouts

Summary