代码之家  ›  专栏  ›  技术社区  ›  dippynark

我如何用Istio将交通镜像到两个地方?

  •  1
  • dippynark  · 技术社区  · 6 年前

    为此,我有以下虚拟服务和目标规则,将流量镜像到我的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
    

    如何将流量镜像到基线,以便基线和canary接收到与生产部署相同的流量?

    0 回复  |  直到 6 年前