| apiVersion: networking.istio.io/v1alpha3 |
| kind: ServiceEntry |
| metadata: |
| name: redirect |
| namespace: testns |
| spec: |
| hosts: |
| - redirect.test.istio.io |
| ports: |
| - number: 8080 |
| name: http |
| protocol: HTTP |
| resolution: STATIC |
| endpoints: |
| - address: 127.0.0.2 |
| ports: |
| http: 8080 |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: VirtualService |
| metadata: |
| name: redirect |
| namespace: testns |
| spec: |
| hosts: |
| - redirect.test.istio.io |
| http: |
| - match: |
| - headers: |
| testredirect: |
| exact: enabled |
| redirect: |
| uri: /new/path |
| authority: redirect2.test.istio.io |