argocd rollout basic setup
First we are going to need the following files and apply them
And this is the rollout file and notice the image we are using is 'blue'
Next we run this command to see what is that status now:
kubectl argo rollouts get rollout rollouts-demo --watch
Changing our image to yellow (yellow)
kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:yellow
So the syntax for this command is here
kubectl argo rollouts set image my-rollout containerName=imageName
As you can see here (from our rollout yaml too) that we have configure our rollout to be canary with indefinite wait. The pod under canary mode image has been updated to yellow.
Here we can see
kubectl argo rollouts promote rollouts-demo
And you can see we have a slightly different pod setup and our second pod has been update to use yellow image as seen here.
To show how an abortion works, let's do this - lets promote this to 'red'
kubectl argo rollouts set image rollouts-demo \ rollouts-demo=argoproj/rollouts-demo:red
And then we will abort
kubectl argo rollouts abort rollouts-demo
We now have all 5 pods running yellow image but in degraded state. To fix this we need to run. I wish there is a short cut command to go previous.
kubectl argo rollouts set image rollouts-demo \ rollouts-demo=argoproj/rollouts-demo:yellow
If you get the rollout status here, you will see that our deployment gets updated:-
kubectl argo rollouts get rollout rollouts-demo -watch
Comments