liveBook · Manning

Revision history limit field

As explained in Kubernetes in Action, Second Edition

The revision history limit field specifies how many old ReplicaSets a Deployment retains for rollback and inspection.

The revision history limit field, `spec.revisionHistoryLimit`, controls how many old ReplicaSets a Deployment keeps. Each retained ReplicaSet represents one Deployment revision that can be inspected or used for rollback; the default is 10. section 15.2.6

Deployment history is stored through associated ReplicaSets rather than inside the Deployment object. Inspect revisions with `kubectl rollout history`, or list ReplicaSets with `-o wide` to see image tags and use annotations to identify revision numbers. section 15.2.6

Inspect a retained revision

Run `kubectl rollout history deploy kiada --revision 2` to inspect revision 2 and its Pod template, including the container image. If the needed revision remains retained, `kubectl rollout undo deployment kiada --to-revision=1` can restore it.

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines retention, storage through ReplicaSets, inspection commands, and the default of 10, but not controller implementation details.
Examples
Uses `kubectl rollout history`, revision-specific inspection, ReplicaSet listings, and targeted `kubectl rollout undo` commands.
What it assumes
Assumes familiarity with Deployments and ReplicaSets while establishing how ReplicaSets represent Deployment revisions.
What you can do after
Operate/configure it by setting Deployment retention and inspecting or rolling back to retained revisions.
How it connects
Connects Deployments with ReplicaSets, rollout history, and rollback to specific revisions.

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.