virtualservice镜像流量
[root@k8s-master 10-traffic-mirror]# kubectl apply -f virtualservice-demoapp.yaml
virtualservice.networking.istio.io/demoapp configured
[root@k8s-master 10-traffic-mirror]# cat virtualservice-demoapp.yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: demoapp
spec:
hosts:
- demoapp
http:
- name: traffic-mirror
route:
- destination:
host: demoapp
subset: v10
mirror:
host: demoapp
subset: v11
直接curl请求
查看demoappv11的日志是否有镜像流量
kubectl logs demoappv11-77755cdc65-wxqr9 -c istio-proxy