Follow the steps given below to rollback the Deployment from the current version to the previous version, which is
version 2.
1. Now you've decided to undo the current rollout and rollback to the previous revision:
kubectl rollout undo deployment/ubuntu-deployment
Alternatively, you can rollback to a specific revision by specifying it with --to-revision:
kubectl rollout undo deployment/ubuntu-deployment --to-revision=2
2. Check if the rollback was successful and the Deployment is running as expected, run:
kubectl get deployment ubuntu-deployment
3. Get the description of the Deployment:
kubectl describe deployment ubuntu-deployment