A canary release is a special instance of a Blue/Green deployment, where the transition happens gradually, rather than instantly. The main goal of canary releases is to reduce the risk of introducing new versions of microservices by rolling them out gradually to a small subset of users before making them available to everyone. Throughout the canary release, the service is monitored and observed via Prometheus metrics, and the traffic is increasingly routed towards the new service. The health of the new service, error rates, and other configurable metrics are constantly checked, until exit criteria have been met.
Install canary release component 🔗︎
backyards canary install
Try it out! 🔗︎
Using the Backyards UI 🔗︎
These examples work out of the box with the demo application packaged with Backyards. Change the service name and namespace to match your service.
Enable Canary on deployment 🔗︎
Canary release can be configured from the dashboard.
Select the workload on the
Workloads or the
Topology view, and create a new rule on the canary tab.
Let’s say we’d like to do a canary release for our
bookings deployment. We can easily enable this from the Backyards UI. Once we enable the canary, we will have a
primary and a
canary pod, with traffic being routed through the
Trigger canary release 🔗︎
We can trigger a canary release on the deployment by changing a specification, like, for example, the deployment’s image:
kubectl set image -n=backyards-demo deploy/bookings-v1 bookings=banzaicloud/allspark:0.0.2
This triggers a canary deployment process. As the application receives a continuous load, more and more traffic will be forwarded to the
canary, providing the Prometheus metrics are within their thresholds for maximum error rates and request durations.
canary pod responds successfully to these requests, at the end of the process all traffic will be being forwarded to it. Then, the
primary will be rolling updated and all traffic will be routed to that instead.
Delete canary 🔗︎
canary is enabled for a deployment, any image change will trigger a canary release process. To disable it, simply disable the
canary on the UI with the
Uninstall canary release component 🔗︎
backyards canary uninstall