liveBook · Manning

Rollout strategy

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A rollout strategy is a policy that determines how workload instances are replaced when an application version changes.

A rollout strategy controls how a Deployment replaces old pods after an application version changes. Kubernetes creates a new ReplicaSet and manages the transition between versions. section 5.1.2

Choose the strategy according to availability and version-compatibility requirements:

  • RollingUpdate keeps old pods until new ReplicaSet pods are ready, reducing downtime and preventing active connections from being severed. section 5.1.2
  • Recreate terminates old pods before starting new ones, causing downtime but supporting applications that cannot run multiple versions simultaneously. section 5.1.2
  • Inspect or change the strategy in the Deployment specification with kubectl edit deploy apache; RollingUpdate is the default. section 5.1.2

Observe an image rollout

Change the Deployment image, then run kubectl get po -w immediately. Watch the old ReplicaSet pods terminate only after the new ReplicaSet pods become ready. section 5.1.2

Figure 5.8 The rollout strategy is set to RollingUpdate with a max surge of 25% and a max unavailable of 25%.
figure

Use the manifest view to inspect RollingUpdate settings such as maxSurge and maxUnavailable. section 5.1.2

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains RollingUpdate and Recreate behavior, configuration, and observation, but does not detail controller internals.
Examples
Uses image changes, kubectl get po -w, Deployment YAML, ReplicaSets, maxSurge, and maxUnavailable.
What it assumes
Assumes basic familiarity with Deployments, ReplicaSets, Pods, replicas, and kubectl.
What you can do after
Operate/configure Deployment rollouts and verify pod replacement with kubectl.
How it connects
Connects Deployments with ReplicaSets, Pods, rolling updates, stateless applications, and application downtime.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.