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 ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.