chapter five

5 Deployment Strategies

 

This chapter covers:

  • Deployment
  • ReplicaSet
  • Blue-Green
  • Canary Deployment
  • Progressive Delivery

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 new 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 which 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   Configure 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

5.5   Summary