9 Managing app releases with rollouts and rollbacks

 

You’ll update existing apps far more often than you’ll deploy something new. Containerized apps inherit multiple release cadences from the base images they use; official images on Docker Hub for operating systems, platform SDKs, and runtimes typically have a new release every month. You should have a process to rebuild your images and release updates whenever those dependencies get updated, because they could contain critical security patches. Key to that process is being able to roll out an update safely and give yourself options to pause and roll back the update if it goes wrong. Kubernetes has those scenarios covered for Deployments, DaemonSets, and StatefulSets.

A single update approach doesn’t work for every type of application, so Kubernetes provides different update strategies for the controllers and options to tune how the strategies work. We’ll explore all those options in this chapter. If you’re thinking of skipping this one because you’re not excited by the thought of 6,000 words on application updates, I’d recommend sticking with it. Updates are the biggest cause of application downtime, but you can reduce the risk significantly if you understand the tools Kubernetes gives you. And I’ll try to inject a little excitement along the way.

9.1 How Kubernetes manages rollouts

9.2 Updating Deployments with rollouts and rollbacks

9.3 Configuring rolling updates for Deployments

9.4 Rolling updates in DaemonSets and StatefulSets

9.5 Understanding release strategies

9.6 Lab