istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/bookinfo/networking/egress-rule-google-apis.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: ServiceEntry 3 metadata: 4 name: googleapis 5 spec: 6 hosts: 7 - www.googleapis.com 8 ports: 9 - number: 80 10 name: http 11 protocol: HTTP 12 - number: 443 13 name: https 14 protocol: HTTPS 15 resolution: DNS 16 --- 17 apiVersion: networking.istio.io/v1alpha3 18 kind: VirtualService 19 metadata: 20 name: rewrite-port-for-googleapis 21 spec: 22 hosts: 23 - www.googleapis.com 24 http: 25 - match: 26 - port: 80 27 route: 28 - destination: 29 host: www.googleapis.com 30 port: 31 number: 443 32 --- 33 apiVersion: networking.istio.io/v1alpha3 34 kind: DestinationRule 35 metadata: 36 name: originate-tls-for-googleapis 37 spec: 38 host: www.googleapis.com 39 trafficPolicy: 40 loadBalancer: 41 simple: ROUND_ROBIN 42 portLevelSettings: 43 - port: 44 number: 443 45 tls: 46 mode: SIMPLE # initiates HTTPS when accessing www.googleapis.com