Reader small image

You're reading from  Kubernetes for Developers

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788834759
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Heck
Joseph Heck
author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck

Right arrow

Deployments and rollouts


Changing the image within a deployment initiates a rollout. A deployment rollout is an asynchronous process that takes time to complete, and is controlled by values defined within the deployment. If you look at the resource file that we dumped into YAML and updated, you will see the defaults that were created for the deployment when we made it with the kubectl run command.

Under spec -> strategy, you will see the default specification of how it will handle an update:

  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate

As of Kubernetes 1.8, there are two strategies available: Recreate and RollingUpdate. RollingUpdate is the default, and is intended for the primary use case of maintaining service availability while doing code updates. Recreate operates differently: killing all existing pods before creating new pods with updated versions, which may result in a short outage.

The RollingUpdate is controlled by two values: maxUnavailable...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kubernetes for Developers
Published in: Apr 2018Publisher: PacktISBN-13: 9781788834759

Author (1)

author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck