liveBook · Manning

Kubectl rollout restart

As explained in Kubernetes in Action, Second Edition

kubectl rollout restart is a kubectl command that recreates the pods managed by a workload resource.

kubectl rollout restart recreates all Pods managed by a Deployment without changing its application version. It deletes and replaces the Pods using the Deployment’s configured update strategy. section 15.2.6

Restart a Deployment

Run kubectl rollout restart for the target Deployment when its Pods need restarting. With RollingUpdate, Kubernetes recreates Pods gradually to maintain service availability. With Recreate, it deletes and recreates all Pods simultaneously. section 15.2.6

The restart preserves the Deployment’s configured rollout behavior:

  • RollingUpdate gradually replaces Pods while maintaining service availability. section 15.2.6
  • Recreate deletes all Pods before recreating them simultaneously. section 15.2.6

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines Pod deletion and replacement, then distinguishes gradual RollingUpdate behavior from simultaneous Recreate behavior.
Examples
Uses the kubectl rollout restart command to restart all Pods belonging to a Deployment.
What it assumes
Assumes a Deployment and awareness that its update strategy controls Pod replacement behavior.
What you can do after
Operate a Deployment restart while anticipating availability differences between RollingUpdate and Recreate.
How it connects
Connects Deployments and Pods with RollingUpdate and Recreate strategies.

Also explained in

Compare how 2 books explain kubectl rollout restart →

Related concepts

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