Kubernetes in Action, Second Edition MEAP V15 cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

14 Managing Pods with Deployments

 

This chapter covers

  • Deploying stateless workloads with the Deployment object
  • Horizontally scaling Deployments
  • Updating workloads declaratively
  • Preventing rollouts of faulty workloads
  • Implementing various deployment strategies

In the previous chapter, you learned how to deploy Pods via ReplicaSets. However, workloads are rarely deployed this way because ReplicaSets don’t provide the functionality necessary to easily update these Pods. This functionality is provided by the Deployment object type. By the end of this chapter, each of the three services in the Kiada suite will have its own Deployment object.

Before you begin, make sure that the Pods, Services, and other objects of the Kiada suite are present in your cluster. If you followed the exercises in the previous chapter, they should already be there. If not, you can create them by creating the kiada namespace and applying all the manifests in the Chapter14/SETUP/ directory with the following command:

$ kubectl apply -f SETUP -R
NOTE

14.1 Introducing Deployments

14.1.1 Creating a Deployment

14.1.2 Scaling a Deployment

14.1.3 Deleting a Deployment

14.2 Updating a Deployment

14.2.1 The Recreate strategy

14.2.2 The RollingUpdate strategy

14.2.3 Configuring how many Pods are replaced at a time

14.2.4 Pausing the rollout process

14.2.5 Updating to a faulty version

14.2.6 Rolling back a Deployment

14.3 Implementing other deployment strategies

14.3.1 The Canary deployment strategy

14.3.2 The A/B strategy

14.3.3 The Blue/Green strategy

14.3.4 Traffic shadowing

14.4 Summary

sitemap