Forrest logo
back to the kubectl tool

kubectl-rollout:tldr:c65e9

kubectl-rollout: Roll back a resource to the previous revision.
$ kubectl rollout undo ${resource_type}/${resource_name}
try on your machine

The command "kubectl rollout undo" is used to rollback or undo a previous deployment in Kubernetes. It is typically used to revert to a previous version of a resource, such as a deployment, replicaset, or statefulset.

In the command format "kubectl rollout undo ${resource_type}/${resource_name}", you need to replace ${resource_type} with the specific type of resource you want to rollback (e.g., deployment, replicaset), and ${resource_name} with the name of the resource you want to undo.

For example, if you want to rollback a deployment named "my-deployment", the command would be: kubectl rollout undo deployment/my-deployment

When this command is executed, Kubernetes will revert the specified resource back to the previous revision, effectively undoing any changes made in the latest deployment.

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