Intelligent Routing with Istio on Alibaba Cloud Container Service for Kubernetes

Request Routing

Set the Default Version of All Microservices to v1

istioctl create -f samples/bookinfo/routing/route-rule-all-v1.yaml
istioctl get virtualservices -o yaml

Route Requests from a Specific User to Reviews v2

kubectl replace -f samples/bookinfo/routing/route-rule-reviews-test-v2.yaml
kubectl  get virtualservice reviews -o yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
clusterName: ""
creationTimestamp: 2018-06-04T10:49:53Z
generation: 0
name: reviews
namespace: default
resourceVersion: "2596548"
selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/reviews
uid: 03528fd9-67e5-11e8-af82-00163e0c19c2
spec:
hosts:
- reviews
http:
- match:
- headers:
cookie:
regex: ^(.*?;)?(user=jason)(;.*)?$
route:
- destination:
host: reviews
subset: v2
- route:
- destination:
host: reviews
subset: v1

Fault Injection

HTTP Delay

kubectl replace -f samples/bookinfo/routing/route-rule-ratings-test-delay.yaml

HTTP Abort

kubectl replace -f samples/bookinfo/routing/route-rule-ratings-test-abort.yaml

Traffic Shifting

kubectl replace -f samples/bookinfo/routing/route-rule-all-v1.yaml
kubectl replace -f samples/bookinfo/routing/route-rule-reviews-50-v3.yaml

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store