Last active
May 26, 2020 10:20
-
-
Save nashmaniac/d7590a8d3b4df3bf2829631e381cbe15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: microservice-virtual-service | |
namespace: default | |
spec: | |
hosts: | |
- microservice.retailvoice.xyz #allowed host | |
gateways: | |
- ingressgateway # list of gateway from which we will be getting request forwarded | |
http: | |
- name: user-http-route | |
match: | |
- uri: | |
prefix: "/user" # if url starts with /user like http://microservice.retailvoice.xyz/user will be directed here | |
rewrite: | |
uri: "/" | |
route: | |
- destination: | |
host: user-service.default.svc.cluster.local | |
port: | |
number: 8000 | |
- name: product-http-route | |
route: | |
- destination: | |
host: product-service.default.svc.cluster.local | |
port: | |
number: 8000 | |
match: | |
- uri: | |
prefix: "/product" # if url starts with /product like http://microservice.retailvoice.xyz/product will be directed here | |
rewrite: | |
uri: "/" |
@montaro Thank you for pointing it out. It was a typo.
@nashmaniac You're welcome!
Thanks again for the great article. ✌️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
Please fix this comment
prefix: "/product" # if url starts with /product like http://microservice.retailvoice.xyz/product will be directed here