Command

Kubernetes Rollback a Deployment Command

The Kubernetes command to rollback a deployment is kubectl rollout undo deployment/frontend.

Quick Answer

Command
kubectl rollout undo deployment/frontend
KubernetesCommand

Rollback a Deployment

Type this command
kubectl rollout undo deployment/frontend

Rolls back to the previous deployment revision.

Tip: Add --to-revision=2 to roll back to a specific revision.

Learn More

How to rollback a deployment in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl rollout undo deployment/frontend, replace any placeholders, and run it.

Tip: Add --to-revision=2 to roll back to a specific revision.

Kubernetes Rollback a Deployment Command

Run kubectl rollout undo deployment/frontend.

Related Commands

Frequently asked questions

What is the Kubernetes command to rollback a deployment?

Run kubectl rollout undo deployment/frontend.

Where do I type this Kubernetes command?

Type it in the terminal or command-line interface used by Kubernetes.

Does this Kubernetes command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify