Forrest logo
back to the kubectl tool

kubernetes:warp:e5221

Rollback to the previous deployment
$ kubectl rollout undo deployment/${deployment_name}
try on your machine

This command is used to roll back or undo a previous deployment to a Kubernetes cluster using the kubectl command-line tool.

  • kubectl: It is a command-line tool used to interact with Kubernetes clusters.
  • rollout undo deployment: This part of the command specifies that the action to be performed is to undo a deployment.
  • ${deployment_name}: It is a placeholder that should be replaced with the name of the deployment you want to roll back.

When executed, the command will initiate a rollback process for the specified deployment. The deployment will be reverted to the previous version, effectively undoing any changes made in the most recent deployment. This is useful in cases where an issue or bug is identified in the current deployment, and you want to quickly revert back to a known working version.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the kubectl tool