[root@master01 tls]# cat vs-tls-product.yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: bookinfo
spec:
exportTo:
- '*'
gateways:
- bookinfo-gateway
hosts:
- '*'
tls:
- match:
- port: 443
sniHosts:
- bookinfo.demo
route:
- destination:
host: productpage.istio.svc.cluster.local
port:
number: 9080
- match:
- port: 443
sniHosts:
- ratings.demo
route:
- destination:
host: ratings.istio.svc.cluster.local
port:
number: 9080
[root@master01 tls]# cat ../../gateway/gateway-tls.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: bookinfo-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: httpS
protocol: HTTPS
hosts:
- "bookinfo.demo"
- "ratings.demo"
tls:
mode: SIMPLE
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
privateKey: /etc/istio/ingressgateway-certs/tls.key