I am trying to do rollback for a deployment config. I am not finding the rollback pointing to older image. It always points to the latest image.
I am trying out the following commands.
oc rollout undo dc/<name>
oc rollback dc/<name>
oc rollback dc/<name> --to-version=1
Please help.
Thanks.
First of all, what about check what revision is referred and what revision is remained on your project ?
$ oc get dc/<your dc name> -o yaml | grep revisionHistoryLimit
revisionHistoryLimit: 10
$ oc rollout history dc/<your dc name>
deploymentconfigs "<your dc name>"
REVISION STATUS CAUSE
1 Failed newer deployment was found running
2 Complete config change
3 Complete config change
4 Complete config change
$ oc describe dc/<your dc name>
Deployment #4 (latest):
:
Deployment #3:
:
I think you can find some message why you can not rollback to old revision through above checking, such as some failed deployment messages or information about that.
I hope it help you.