如何使用Istio将流量镜像到两个地方?

时间:2019-01-16 22:54:51

标签: kubernetes istio canary-deployment

作为我的连续部署流程的一部分,我部署了金丝雀和基准,比较了两者的指标并分析了结果,以确定是否将金丝雀推广到生产中。为了改善收集的指标,我想使用Istio将生产流量镜像到Canary和基准部署。

为此,我有以下虚拟服务和目标规则,可将流量镜像到我的Canary部署:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: goldengoose
  namespace: goldengoose
spec:
  hosts:
  - "*"
  gateways:
  - goldengoose
  http:
  - route:
    - destination:
        port:
          number: 80
        host: goldengoose
        subset: prod
    mirror:
      host: goldengoose
      subset: canary
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: goldengoose
  namespace: goldengoose
spec:
  host: goldengoose
  subsets:
  - name: prod
    labels:
      track: prod
  - name: baseline
    labels:
      track: baseline
  - name: canary
    labels:
      track: canary

我还如何将流量镜像到基线,以便基线和金丝雀都收到与生产部署相同的流量?

0 个答案:

没有答案