---apiVersion:apps/v1kind:Deploymentmetadata:name:my-examplelabels:app:my-examplespec:replicas:1selector:matchLabels:app:my-exampletemplate:metadata:labels:app:my-examplespec:containers:-name:my-exampleimage:nginxports:-containerPort:80---kind:ServiceapiVersion:v1metadata:name:my-examplespec:selector:app:my-exampleports:-protocol:TCPport:80type:NodePort---apiVersion:networking.istio.io/v1alpha3kind:VirtualServicemetadata:name:my-examplespec:hosts:-"my-app.com"gateways:-default/my-app-gw# Gateway can be in a different namespacehttp:-match:-uri:prefix:/t2rewrite:uri:/route:-destination:port:number:80host:my-example
apiVersion:networking.istio.io/v1alpha3kind:Gatewaymetadata:name:my-gatewaynamespace:some-config-namespacespec:selector:app:my-gateway-controllerservers:-port:number:80name:httpprotocol:HTTPhosts:-uk.bookinfo.com-eu.bookinfo.comtls:httpsRedirect:true# sends 301 redirect for http requests-port:number:443name:https-443protocol:HTTPShosts:-uk.bookinfo.com-eu.bookinfo.comtls:mode:SIMPLE# enables HTTPS on this portserverCertificate:/etc/certs/servercert.pemprivateKey:/etc/certs/privatekey.pem-port:number:9443name:https-9443protocol:HTTPShosts:-"bookinfo-namespace/*.bookinfo.com"tls:mode:SIMPLE# enables HTTPS on this portcredentialName:bookinfo-secret# fetches certs from Kubernetes secret-port:number:9080name:http-wildcardprotocol:HTTPhosts:-"*"-port:number:2379# to expose internal service via external port 2379name:mongoprotocol:MONGOhosts:-"*"