Skip to content

Instantly share code, notes, and snippets.

@masroorhasan
Created March 21, 2019 05:31
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 masroorhasan/1b9e8773dcdd46cce9f20f755ec1d59a to your computer and use it in GitHub Desktop.
Save masroorhasan/1b9e8773dcdd46cce9f20f755ec1d59a to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: resnet-serving-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 31400
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: resnet-serving
spec:
hosts:
- "*"
gateways:
- resnet-serving-gateway
http:
- route:
- destination:
host: resnet-serving.default.svc.cluster.local
port:
number: 9000
subset: v1
weight: 50
- destination:
host: resnet-serving.default.svc.cluster.local
port:
number: 9000
subset: v2
weight: 50
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: resnet-serving
spec:
host: resnet-serving.default.svc.cluster.local
trafficPolicy:
loadBalancer:
simple: RANDOM
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment