Applying changes to a Deployment process with the --record flag then Kubernetes by default saves the previous Deployment activities in its history.
The below command will display all the prior Deployments,
kubectl rollout history deployment <deployment>
The last Deployment can be restored with the command,
kubectl rollout undo deployment <deployment>
The Deployments which are in progress can also be paused and resumed.
The moment new Deployment is applied, during this process a new ReplicaSet object is created which is slowly scaled up while the old ReplicaSet is scaled down.
We can get the ReplicaSet that has been rolled out with command
kubectl get replicaset
Each ReplicaSet is named with the format -
kubectl describe replicaset <replicaset>a