Discovering a critical bug is probably the most common reason for a rollback. Still, there are others. For example, we might be in a situation when Pods cannot be created. An easy to reproduce case would be an attempt to deploy an image with a tag that does not exist.
kubectl set image \ -f deploy/go-demo-2-api.yml \ api=vfarcic/go-demo-2:does-not-exist \ --record
The output is as follows:
deployment "go-demo-2-api" image updated
After seeing such a message, you might be under the impression that everything is OK. However, that output only indicates that the definition of the image used in the Deployment was successfully updated. That does not mean that the Pods behind the ReplicaSet are indeed running. For one, I can assure you that the vfarcic/go-demo-2:does-not-exist image does not exist.
Please make sure that at least...