Progressive delivery demo using canary deployments with Kubernetes and Argo Rollouts
- Make
- Docker
- Kubectl
- Kind
- Helm
- Argo Rollouts Kubectl plugin (optional)
Everything is configured through Make to keep it simple. Just follow these steps.
This will check for all required and optional dependencies
$ make verify-prereqs
You can continue with the next step once you have all required dependencies.
The below command will create a Kind cluster named argo-rollouts-demo
and will install the Argo Controller and CRDs, Prometheus, Istio and Kiali.
$ make cluster-up
This command will create a few image tags for our test service
$ make build-images
Before being able to use images in a Kind cluster, you need to load them first. The below command will take care of that.
$ make load-images
Run the below command to deploy the green
tag version of the service. Since this is the initial deployment, steps/analysis will be skipped and the deployment will become stable as soon as the pods are healthy.
$ make helm-upgrade
Open http://localhost:8080/ in your browser to see the demo app. All squares should report back as green
You can use the below command to deploy a canary version. Valid VERSION
values are green
, blue
, yellow
and pruple
. Version yellow
simulates a 50% error rate which would fail the error-rate analysis.
$ make helm-upgrade VERSION=blue
You can watch the rollout using the below command (requires the Argo Kubectl plugin),
$ make watch
$ make helm-uninstall # removes the rollout in case you want to deploy from scracth
$ make delete-cluster # deletes the cluster creating during cluster-up
If you want to open the Kiali Web App run the below command (this will block the shell),
$ kubectl port-forward svc/kiali 20001:20001 -n istio-system
Now you can open Kiali in your browser at http://localhost:20001/
If you want to access the Prometheus UI run the below command (this will block the shell),
$ kubectl port-forward service/prometheus-server 9090:80 -n prometheus
Now you can open Prometheus in your browser at http://localhost:9090/