apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: nginx-default-v2
namespace: lizhe
spec:
hosts:
- nginx-service
http:
- match:
- sourceLabels:
app: v2
route:
- destination:
host: nginx-service
subset: v2
- match:
- sourceLabels:
app: v3
route:
- destination:
host: nginx-service
subset: v3
- route:
- destination:
host: nginx-service
subset: v1
然后我们给 nginx 打个label
然后去把label改成 v3