Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Istio Traffic Routing demo - version 1
---
kind: Service
apiVersion: v1
metadata:
name: myversion
labels:
app: myversion
spec:
selector:
app: myversion
ports:
- name: http
protocol: TCP
port: 80
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: myversion-v1
spec:
replicas: 1
template:
metadata:
labels:
app: myversion
version: v1.0
spec:
containers:
- name: myversion
image: yoichikawasaki/myversion:v1.111111111
imagePullPolicy: Always
ports:
- containerPort: 80
env:
- name: MYVERSION_PORT
value: "80"
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gateway
annotations:
kubernetes.io/ingress.class: "istio"
spec:
rules:
- http:
paths:
- path: /version.*
backend:
serviceName: myversion
servicePort: 80
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment