0

I am trying to put in place a traffic mirroring using VirtualService from my-service to my-service-mirror. I'd like to mirror ONLY traffic going through specific endpoints of my-service (path prefix cars that I defined in my Controller class : @RequestMapping("cars")).

My VirutalService looks like this :

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: my-service-mirroring
  namespace: my-namespace
spec:
  hosts:
    - my-service-svc.my-namespace.svc.cluster.local
  http:
    - mirror:
        host: my-service-mirror-svc.my-namespace.svc.cluster.local
      mirrorPercent: 10
      route:
        - destination:
            host: my-service-svc.my-namespace.svc.cluster.local

Is there a way to do this with VirutalService (like update the destination host)?

Thanks.

ah_ben
  • 85
  • 7
  • For traffic mirroring the host and service name will be same, only versions of deployment will be different and based on weight it will route the traffic using authority headers. Path based routing can be used for normal request mapping using normal virtual service – Nataraj Medayhal Jun 22 '23 at 14:07

0 Answers0