CloudsArk
Builds Images and Deployments Openshift

OpenShift Rollout Undo

Learn practical openshift rollout undo with oc commands, OpenShift manifests, verification steps, common mistakes, and production-focused guidance.

OpenShift Rollout Undo

Introduction

Rollout undo restores a previous Deployment revision when a new image or pod template change fails. Always inspect rollout history before choosing the revision.

Before You Start

Make sure you are in the correct project and know whether the application is driven by a Deployment, DeploymentConfig, BuildConfig, ImageStream, or external registry image.

Practical Examples

oc rollout history deployment/web -n app
oc rollout undo deployment/web --to-revision=2 -n app
oc rollout status deployment/web -n app
oc get pods -n app -l app=web

Example output:

deployment.apps/web rolled back
deployment "web" successfully rolled out

Verification

oc rollout history deployment/web -n app
oc describe deployment web -n app
oc logs deploy/web -n app

Troubleshooting

Review rollout history, choose the known-good revision, run the rollback, and verify the restored pods and application behavior.

Common Mistakes

  • Rolling back without knowing which revision was stable.
  • Assuming ConfigMap or Secret content also rolls back.
  • Skipping post-rollback application testing.

Quick Checklist

  • Confirm the active project.
  • Inspect the exact object named in the error.
  • Read recent events.
  • Apply one focused fix.
  • Verify status after the change.

Summary

OpenShift Rollout Undo should be verified with commands that match the OpenShift object being changed or investigated.