Kubernetes canary deployment routing based on geographic location

10/30/2017

I have built a simple canary deployment in Kubernetes GCP but I dont have any control of the traffic routing , right now its random.

Ideally I would like to control the routing based on the Geographic location , however browser-agent would also do or any parameter where i can control the routing.

I followed the canary deployment technique using this link

Is there something in-built provided by k8s ?

Any pointers would be great.

-- Imran Pochi
kubernetes

1 Answer

10/30/2017

Take a look at Canary Deployments using Istio.

For example, the following rule will only apply to an incoming request if it includes a “cookie” header that contains the substring “user=jason”.

apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
  name: ratings-jason
spec:
  destination:
    name: reviews
  match:
    request:
      headers:
        cookie:
          regex: "^(.*?;)?(user=jason)(;.*)?
quot;
...
-- silverfox
Source: StackOverflow