Skip to content

Instantly share code, notes, and snippets.

@ronamosa
Created March 8, 2020 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronamosa/97f737f79c49ba56a25da3bb3bc38a32 to your computer and use it in GitHub Desktop.
Save ronamosa/97f737f79c49ba56a25da3bb3bc38a32 to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: bookinfo-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "yourdomain.com"
tls:
httpsRedirect: true
- port:
number: 443
name: https-443
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: ingress-cert
hosts:
- "yourdomain.com"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: bookinfo
spec:
hosts:
- "yourdomain.com"
gateways:
- bookinfo-gateway
http:
- match:
- uri:
exact: /productpage
- uri:
prefix: /static
- uri:
exact: /login
- uri:
exact: /logout
- uri:
prefix: /api/v1/products
route:
- destination:
host: productpage
port:
number: 9080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment