Kubernetes

Rollouts, Rollbacks, and Deployment Strategies

Control Deployment rollouts with explicit revisions, surge and unavailability limits, status checks, pause points, and rollback evidence.

Intermediate14 min read
Kubernetes lessonContainer and orchestration foundationsLearn

Control Deployment rollouts with explicit revisions, surge and unavailability limits, status checks, pause points, and rollback evidence.

What you will be able to do

  • Distinguish desired revision from rolling update in a realistic rollouts, rollbacks, and deployment strategies case.
  • Interpret the operational evidence and boundary associated with surge capacity.
  • Choose an appropriate action involving rollback action without exceeding the named workload scope.
  • Verify rollout verification through an observable runtime result and reproducible handoff.

01

Frame Rollouts, Rollbacks, and Deployment Strategies

Control Deployment rollouts with explicit revisions, surge and unavailability limits, status checks, pause points, and rollback evidence.

A new API image increases errors after half the replicas update. The operator must stop progression and restore the previous known-good revision.

Keep declared state, runtime state, observable evidence, access boundaries, and recovery outcomes separate. Begin with the smallest read-only inspection that identifies the exact image, container, Pod, controller, network, storage object, or policy in scope.

02

Desired revision

Changing a Deployment Pod template creates rollout intent for a new revision. Within rollouts, rollbacks, and deployment strategies, this role answers one specific container or orchestration question and keeps its own evidence.

Record the exact image digest and change cause before applying it. Apply that action to the named workload before expanding scope, changing another resource, or discarding the current state.

Respect this boundary: do not use a moving image tag as the only revision identity. The observable result is specific: the deployment template contains the intended digest.

03

Rolling update

A rolling update scales new and old ReplicaSets according to the Deployment strategy. Within rollouts, rollbacks, and deployment strategies, this role answers one specific container or orchestration question and keeps its own evidence.

Observe old and new replica counts while the update advances. Apply that action to the named workload before expanding scope, changing another resource, or discarding the current state.

Respect this boundary: do not manually delete all old pods to accelerate an uncertain rollout. The observable result is specific: ready new replicas replace old replicas within policy.

04

Surge capacity

Maximum surge and maximum unavailable values bound capacity during a rolling update. Within rollouts, rollbacks, and deployment strategies, this role answers one specific container or orchestration question and keeps its own evidence.

Choose values that preserve the API service requirement. Apply that action to the named workload before expanding scope, changing another resource, or discarding the current state.

Respect this boundary: do not set both bounds in a way that permits unacceptable outage. The observable result is specific: available capacity remains above the required level.

05

Rollback action

Deployment revision history can support rollback to a previous template when a rollout is harmful. Within rollouts, rollbacks, and deployment strategies, this role answers one specific container or orchestration question and keeps its own evidence.

Pause or stop advancement and roll back to the identified healthy revision. Apply that action to the named workload before expanding scope, changing another resource, or discarding the current state.

Respect this boundary: do not roll back without preserving the failed revision evidence. The observable result is specific: the previous image digest again serves traffic.

06

Rollout verification

Rollout completion requires controller status, ready replicas, and application-level evidence. Within rollouts, rollbacks, and deployment strategies, this role answers one specific container or orchestration question and keeps its own evidence.

Verify rollout status, endpoints, error rate, and sample requests. Apply that action to the named workload before expanding scope, changing another resource, or discarding the current state.

Respect this boundary: do not accept a completed controller status when user errors remain elevated. The observable result is specific: the restored revision is ready and error behavior returns to baseline.

07

Apply Rollouts, Rollbacks, and Deployment Strategies to One Workload

Use one bounded workload decision: A new API image increases errors after half the replicas update. The operator must stop progression and restore the previous known-good revision.

First, record the exact image digest and change cause before applying it. Then, observe old and new replica counts while the update advances. Preserve both observations with the exact resource identity before changing runtime state.

Next, choose values that preserve the api service requirement. After that, pause or stop advancement and roll back to the identified healthy revision. Close the task only after you verify rollout status, endpoints, error rate, and sample requests.

08

Recap Before Practice and Prove

Desired revision: Changing a Deployment Pod template creates rollout intent for a new revision. In this workload, record the exact image digest and change cause before applying it. Preserve the boundary: do not use a moving image tag as the only revision identity.

Rolling update: A rolling update scales new and old ReplicaSets according to the Deployment strategy. In this workload, observe old and new replica counts while the update advances. Preserve the boundary: do not manually delete all old pods to accelerate an uncertain rollout.

Surge capacity: Maximum surge and maximum unavailable values bound capacity during a rolling update. In this workload, choose values that preserve the api service requirement. Preserve the boundary: do not set both bounds in a way that permits unacceptable outage.

Rollback action: Deployment revision history can support rollback to a previous template when a rollout is harmful. In this workload, pause or stop advancement and roll back to the identified healthy revision. Preserve the boundary: do not roll back without preserving the failed revision evidence.

Rollout verification: Rollout completion requires controller status, ready replicas, and application-level evidence. In this workload, verify rollout status, endpoints, error rate, and sample requests. Preserve the boundary: do not accept a completed controller status when user errors remain elevated.

NEXT STEP

Turn reading into recall

Practice the concepts without a timer, with coaching and retry available after every answer.

Open guided practice