Skip to content

Instantly share code, notes, and snippets.

@sujeet100
Last active June 4, 2021 13:33
Show Gist options
  • Save sujeet100/aeead4034199d3b8d585025ed1eaa9af to your computer and use it in GitHub Desktop.
Save sujeet100/aeead4034199d3b8d585025ed1eaa9af to your computer and use it in GitHub Desktop.
Kong ingress / Istio gateway and routing example (covers path based routing with url rewrite)
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: moviesservice
spec:
hosts:
- "*"
gateways:
- istio-gateway
http:
- match:
- uri:
prefix: /movies-service
rewrite:
uri: " " #https://github.com/istio/istio/issues/8076
route:
- destination:
port:
number: 80
host: movies-service
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: istio-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kong-ingress
annotations:
kubernetes.io/ingress.class: kong
spec:
rules:
- http:
paths:
- path: /movies
backend:
serviceName: movies-service
servicePort: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment