Last active
June 4, 2021 13:33
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: istio-gateway | |
spec: | |
selector: | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
hosts: | |
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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