liveBook · Manning

Rolling update

As explained in Machine Learning Platform Engineering

A rolling update is a gradual replacement of running application instances with instances of a newer version while maintaining service availability.

A rolling update gradually replaces running application instances with a newer container image, preserving service availability while the deployment moves toward the desired state. If a new pod encounters errors, the update pauses instead of replacing every old instance. section 3.3.3

A Kubernetes Deployment coordinates the update:

  • The Deployment manages ReplicaSets, which manage pods containing the application container. section 3.3.3
  • Changing the image from hello-joker:v1 to hello-joker:v2 causes Kubernetes to scale the new ReplicaSet up while scaling the old ReplicaSet down. section 3.3.3

Updating hello-joker

Apply a Deployment with three replicas, change its image to v2, and run kubectl apply -f deployment.yaml. Inspect readiness and Deployment events to observe the new and old ReplicaSets being scaled in turn.

How Machine Learning Platform Engineering covers it

How deep it goes
Explains Deployment-managed ReplicaSet scaling, pauses on errors, and rollback, but does not detail update strategy parameters.
Examples
Uses a three-replica hello-joker Deployment updated from image v1 to v2, with kubectl status and event commands.
What it assumes
Builds from pods and ReplicaSets before configuring a Deployment as the higher-level update abstraction.
What you can do after
Operate/configure a Kubernetes Deployment, observe its rollout, and undo a problematic update.
How it connects
Connects Kubernetes Deployments with ReplicaSets, pods, declarative updates, container images, and rollback.

Also explained in

Compare how 8 books explain rolling update →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.