Skip to content

Instantly share code, notes, and snippets.

@janakiramm
Created October 18, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save janakiramm/35078d95730745caa62f81d917d6d553 to your computer and use it in GitHub Desktop.
Save janakiramm/35078d95730745caa62f81d917d6d553 to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: app-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: myapp
spec:
host: myapp
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: myapp
spec:
hosts:
- "*"
gateways:
- app-gateway
http:
- route:
- destination:
host: myapp
subset: v1
weight: 0
- destination:
host: myapp
subset: v2
weight: 100
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment