정혜일
정혜일

Reputation: 1

When istio applies blue green deployment, where are existing connections routed?

I want to apply blue green in a Kubernetes environment with multiple microservices using istio.

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: mesh-istio-bluegreen
spec:
  hosts:
    - mesh-istio-bluegreen.pipecd.dev
  gateways:
    - mesh-istio-bluegreen
  http:
    - route:
      - destination:
          host: mesh-istio-bluegreen
          subset: blue
        weight: 100

    - route:
      - destination:
          host: mesh-istio-bluegreen
          subset: green
        weight: 0

The above code is a official example and assumes that the destination rule already exists.

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: mesh-istio-bluegreen
spec:
  hosts:
    - mesh-istio-bluegreen.pipecd.dev
  gateways:
    - mesh-istio-bluegreen
  http:
    - route:
      - destination:
          host: mesh-istio-bluegreen
          subset: blue
        weight: 0

    - route:
      - destination:
          host: mesh-istio-bluegreen
          subset: green
        weight: 100

When switch over, then above virtual service will be applied.

Then my question is this: What happens to the connection to blue when switch over from blue to green? Existing connections routes to blue? or green?

I searched and implemented several options to apply blue green deployment. I considered 3 options: route53 weight, nlb, and argo rollout.

However, in the case of istio, it is difficult because its internal operation is not much known. If anyone knows anything about this please help.

Upvotes: 0

Views: 44

Answers (0)

Related Questions