kustomize build manifests/ArgoCD201-RolloutsDemoCanaryIstio/ | kubectl apply -f -
Run kubectl get services -n istio-system | grep istio-ingressgateway
and wait for <pending>
to switch to localhost
if it does not try quiting and restarting docker for desktop. You can also try resetting docker for desktops kubernetes cluster.
Now visit http://localhost to view the demo app and run kubectl argo rollouts dashboard
cmd then visit http://localhost:3100/rollouts to view rollouts
dashboard.
kubectl -n argo-rollouts-istio patch rollout istio-host-split --type json --patch '[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "ghcr.io/argocon22workshop/rollouts-demo:red" }]'
View the demo app at http://localhost and see the new color red at roughly 25% this is because we have this defined in our rollout spec:
steps:
- setWeight: 25
- pause: {}
- setWeight: 50
- pause: {}
- setWeight: 75
- pause: {}
Because we have executed a rollout and are now in the middle of we are currently at the second step. This is an indefinite pause. We will now move on to the next step by promoting using the CLI command below.
kubectl argo rollouts promote istio-host-split -n argo-rollouts-istio
Now you should see the new color red at roughly 50% of the traffic.
We will now use full promote to skip going to the 75% step and go strait to fully deploying the new color.
kubectl argo rollouts promote --full istio-host-split -n argo-rollouts-istio
If you do not have the UI running locally yet run the following command:
kubectl argo rollouts dashboard
Then visit the UI at: http://localhost:3100/rollouts
You can then update the rollout image to a new color and promote the rollout to the next steps via the UI.
kubectl -n argo-rollouts-istio patch rollout istio-host-split --type json --patch '[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value": "ghcr.io/argocon22workshop/rollouts-demo:green" }]'