| apiVersion: networking.istio.io/v1alpha3 |
| kind: Gateway |
| metadata: |
| name: istio-ingress |
| namespace: testns |
| spec: |
| selector: |
| istio: ingress |
| servers: |
| - port: |
| number: 80 |
| name: http |
| protocol: HTTP |
| hosts: |
| - "*" |
| - port: |
| number: 443 |
| name: https |
| protocol: HTTPS |
| hosts: |
| - "*" |
| tls: |
| mode: SIMPLE |
| serverCertificate: /etc/certs/servercert.pem |
| privateKey: /etc/certs/privatekey.pem |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: VirtualService |
| metadata: |
| name: ingress |
| namespace: testns |
| spec: |
| # K8S Ingress rules are converted on the fly to a VirtualService. |
| # The local tests may run without k8s - so for ingress we test with the |
| # equivalent rule. |
| hosts: |
| - "*" |
| gateways: |
| - istio-ingress |
| http: |
| - match: |
| - uri: |
| prefix: /foo |
| route: |
| - destination: |
| host: service3.default.svc.cluster.local |
| port: |
| number: 80 |
| |
| |