![Forrest logo](/images/logo.png)
kubectl-rollout:tldr:c65e9
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.