Skip to Content
Kubernetes Patterns
book

Kubernetes Patterns

by Bilgin Ibryam, Roland Huß
April 2019
Intermediate to advanced
266 pages
6h 6m
English
O'Reilly Media, Inc.
Content preview from Kubernetes Patterns

Chapter 3. Declarative Deployment

The heart of the Declarative Deployment pattern is Kubernetes’ Deployment resource. This abstraction encapsulates the upgrade and rollback processes of a group of containers and makes its execution a repeatable and automated activity.

Problem

We can provision isolated environments as namespaces in a self-service manner and have the services placed in these environments with minimal human intervention through the scheduler. But with a growing number of microservices, continually updating and replacing them with newer versions becomes an increasing burden too.

Upgrading a service to a next version involves activities such as starting the new version of the Pod, stopping the old version of a Pod gracefully, waiting and verifying that it has launched successfully, and sometimes rolling it all back to the previous version in the case of failure. These activities are performed either by allowing some downtime but no running concurrent service versions, or with no downtime, but increased resource usage due to both versions of the service running during the update process. Performing these steps manually can lead to human errors, and scripting properly can require a significant amount of effort, both of which quickly turn the release process into a bottleneck.

Solution

Luckily, Kubernetes has automated this activity as well. Using the concept of Deployment, we can describe how our application should be updated, using different strategies, and tuning ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Kubernetes: Up and Running

Kubernetes: Up and Running

Kelsey Hightower, Brendan Burns, Joe Beda

Publisher Resources

ISBN: 9781492050278Errata PageSupplemental Content