July 2019
Intermediate to advanced
502 pages
14h
English
We previously discovered how to perform canary deployments in Kubernetes. If we want to divert 10% of requests to our canary version, we have to deploy nine pods of the current version and one canary pod to get the correct ratio. Kubernetes' load balancing is tightly coupled to deployed pods. This is suboptimal. Istio has a better load balancing approach since it operates at the network level. You can simply configure two versions of your service and decide what percentage of requests go to each version, regardless of how many pods run each version.
Here is an example of where Istio will split the traffic and send 95% to v1 of the service and 5% to v2 of the service:
apiVersion: networking.istio.io/v1alpha3kind: VirtualService ...