DEVOPS / A CONCEPT NOTE

Rollbacks

undoing a bad release

~65 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

The process of reverting a system to its last known stable state. Reverting deployments can be achieved by redeploying the previous build artifact or modifying DNS/routing selectors.

02 / FOLLOW THE MECHANISM

How a deployment rollback flows

  1. Outage detection

    alerts fire because error rates spike post-deployment.

  2. Rollback command

    deployer triggers rollback, pointing active configuration back to previous stable release tag.

  3. Target Swap

    system starts launching stable pods while gracefully terminating broken version pods.

  4. Verification

    metrics stabilize back to normal baseline range.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

revert a Kubernetes deployment rollout immediately

kubectl rollout undo deployment/my-app

EXAMPLE 02 · REFERENCE

create a new commit that undoes the changes of a broken commit

git revert COMMIT_SHA

Explore command anatomy in the CLI lab