Skip to content

Instantly share code, notes, and snippets.

@markusthoemmes
Last active January 11, 2019 10:09
Show Gist options
  • Save markusthoemmes/221f26f0671bbbc7b63472213aac5d34 to your computer and use it in GitHub Desktop.
Save markusthoemmes/221f26f0671bbbc7b63472213aac5d34 to your computer and use it in GitHub Desktop.
Istio graceful shutdown reproducer
apiVersion: v1
kind: Service
metadata:
name: test-service
spec:
ports:
- port: 8080
name: http
selector:
app: test
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-deployment
spec:
replicas: 1
selector:
matchLabels:
app: test
template:
metadata:
labels:
app: test
annotations:
sidecar.istio.io/inject: "true"
spec:
containers:
- name: test
image: markusthoemmes/timeout
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: test-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "test.com"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: test-virtualservice
spec:
hosts:
- "test.com"
gateways:
- test-gateway
http:
- route:
- destination:
host: test-service
port:
number: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment