Skip to content

Instantly share code, notes, and snippets.

@tanan
Created October 9, 2018 04:36
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 tanan/296009c3e50bb8280783f94ec50e68e6 to your computer and use it in GitHub Desktop.
Save tanan/296009c3e50bb8280783f94ec50e68e6 to your computer and use it in GitHub Desktop.
create istio virtual service
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: nginx-ds
namespace: default
spec:
gateways:
- sample-gateway
hosts:
- "sample.hoge.com"
http:
- match:
- headers:
x-version:
exact: green
route:
- destination:
host: nginx-svc.sample-ns.svc.cluster.local
subset: green
port:
number: 40001
- match:
- uri:
prefix: /
route:
- destination:
host: nginx-svc.sample-ns.svc.cluster.local
subset: blue
port:
number: 40001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment