# Split traffic using header | |
# Will use c-weighted endpoint | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: headers-route | |
namespace: testns | |
spec: | |
hosts: | |
- headers.test.istio.io | |
http: | |
- match: | |
- headers: | |
version: | |
exact: v2 | |
sourceLabels: | |
version: v1 | |
route: | |
- destination: | |
host: c-weighted.extsvc.com | |
subset: v2 | |
weight: 100 | |
- route: | |
- destination: | |
host: c-weighted.extsvc.com | |
subset: v1 | |
weight: 100 |