Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tanan
Created November 18, 2018 14:00
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/c85150ee3230658ecf939198b8234890 to your computer and use it in GitHub Desktop.
Save tanan/c85150ee3230658ecf939198b8234890 to your computer and use it in GitHub Desktop.
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: blue
route:
- destination:
host: nginx-svc.sample-ns.svc.cluster.local
subset: blue
port:
number: 40001
- match:
- uri:
prefix: /
route:
- destination:
host: nginx-svc.sample-ns.svc.cluster.local
subset: green
port:
number: 40001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment