Skip to content

Instantly share code, notes, and snippets.

@incfly
Created May 2, 2019 00:05
Show Gist options
  • Save incfly/5316c0cf5e907d41fe06f9c04cbd769e to your computer and use it in GitHub Desktop.
Save incfly/5316c0cf5e907d41fe06f9c04cbd769e to your computer and use it in GitHub Desktop.
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: istio-default-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
#curl -H "Host: springbootweb.apps.svc.cluster.local:30999" localhost:30999/
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: httpbin
spec:
hosts:
- "httpbin.default.svc.cluster.local"
- "httpbin"
gateways:
- istio-default-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: httpbin # interpreted as springbootweb.apps.svc.cluster.local
port:
number: 8000
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment