Skip to content

Instantly share code, notes, and snippets.

@tahaozket
Created January 8, 2019 10:42
Show Gist options
  • Save tahaozket/a151e64d6822ddb33e8f3d5221d6e824 to your computer and use it in GitHub Desktop.
Save tahaozket/a151e64d6822ddb33e8f3d5221d6e824 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: coffee
spec:
replicas: 2
selector:
matchLabels:
app: coffee
template:
metadata:
labels:
app: coffee
spec:
containers:
- name: coffee
image: nginxdemos/hello:plain-text:v1
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: coffee-svc
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: coffee
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: cafe-ingress
spec:
tls:
- hosts:
- cafe.example.com
secretName: cafe-secret
rules:
- host: cafe.example.com
http:
paths:
- path: /coffee
backend:
serviceName: coffee-svc
servicePort: 80
---
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
name: "coffee"
spec:
targets:
- name: coffee
peers:
- mtls: {}
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: coffee
spec:
hosts:
- coffee
http:
- route:
- destination:
host: coffee
subset: v1
weight: 50
- destination:
host: coffee
subset: v2
weight: 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment