Skip to content

Instantly share code, notes, and snippets.

@giang-pham
Created September 2, 2019 03:58
Show Gist options
  • Save giang-pham/96202e91c4e4f10a9d131badaf571e5c to your computer and use it in GitHub Desktop.
Save giang-pham/96202e91c4e4f10a9d131badaf571e5c to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: [APP_VS]
namespace: [APP]
spec:
gateways:
- default/default-gateway
hosts:
- [HOST]
http:
- match:
- uri:
prefix: /
route:
- destination:
host: [APP_SERVICE].[NAMESPACE].svc.cluster.local
subset: blue
port:
number: 80
weight: 100
- destination:
host: [APP_SERVICE].[NAMESPACE].svc.cluster.local
subset: green
port:
number: 80
weight: 0
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: [APP_DR]
namespace: [APP]
spec:
host: [APP_SERVICE]
subsets:
- name: blue
labels:
subset: blue
- name: green
labels:
subset: green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment