Canary Testing with a v2
A canary release is a method of slowly exposing a new version of software. The theory behind it is that by serving the new version of the software initially to say, 5% of requests, if there is a problem, the problem only impacts a very small percentage of users before its discovered and rolled back.
So now back to our DJ App scenario… the V2 of the metal and jazz services are out, and they now include the city each artist is from in the response. Let’s see how we can release v2 versions of metal and jazz services in a canary fashion using App Mesh.
When we’re complete, requests to metal and jazz will be distributed in a weighted fashion to both the v1 and v2 versions.

To begin, we’ll rollout the v2 deployments, services, and Virtual Nodes with a single YAML file:
kubectl apply -nprod -f 5_canary/jazz_v2.yaml
Output should be similar to:
Next, we’ll update the jazz Virtual Service by modifying the route to spread traffic 90⁄10 across the two versions. If we take a look at it now, we’ll see the current route which points to jazz-v1 100%:
kubectl describe virtualservice jazz -nprod
yields:
We apply the updated service definition:
kubectl apply -nprod -f 5_canary/jazz_service_update.yaml
And when we describe the Virtual Service again, we see the updated route:
kubectl describe virtualservice jazz -nprod
as 90⁄10:
We perform the same steps to deploy metal-v2. Rollout the v2 deployments, services, and Virtual Nodes with a single YAML file:
kubectl apply -nprod -f 5_canary/metal_v2.yaml
Output should be similar to:
Update the metal Virtual Service by modifying the route to spread traffic 50⁄50 across the two versions:
kubectl apply -nprod -f 5_canary/metal_service_update.yaml
And when we describe the Virtual Service again, we see the updated route:
kubectl describe virtualservice metal -nprod
yields:
Now that the v2’s are deployed, let’s test them out.