This commit is contained in:
Jonathan Cook
2019-10-23 15:01:44 +02:00
parent db85c8f275
commit 684ec0d2e3
20486 changed files with 1642483 additions and 0 deletions
@@ -0,0 +1,36 @@
kind: Service
apiVersion: v1
metadata:
name: demo-backend
spec:
selector:
app: demo-backend
tier: backend
ports:
- protocol: TCP
port: 8080
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-backend
spec:
selector:
matchLabels:
app: demo-backend
tier: backend
replicas: 3
template:
metadata:
labels:
app: demo-backend
tier: backend
spec:
containers:
- name: demo-backend
image: demo-backend:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
@@ -0,0 +1,34 @@
kind: Service
apiVersion: v1
metadata:
name: demo-frontend
spec:
selector:
app: demo-frontend
ports:
- protocol: TCP
port: 8081
nodePort: 30001
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-frontend
spec:
selector:
matchLabels:
app: demo-frontend
replicas: 3
template:
metadata:
labels:
app: demo-frontend
spec:
containers:
- name: demo-frontend
image: demo-frontend:latest
imagePullPolicy: Never
ports:
- containerPort: 8081
@@ -0,0 +1,54 @@
apiVersion: v1
kind: Service
metadata:
name: liveness-example
spec:
selector:
app: liveness-example
ports:
- port: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: liveness-example
spec:
selector:
matchLabels:
app: liveness-example
replicas: 1
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
app: liveness-example
spec:
containers:
- name: liveness-example
image: dbdock/liveness-example:1.0.0
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 400Mi
cpu: 400m
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
timeoutSeconds: 2
periodSeconds: 3
failureThreshold: 1
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 20
timeoutSeconds: 2
periodSeconds: 8
failureThreshold: 1
@@ -0,0 +1,54 @@
apiVersion: v1
kind: Service
metadata:
name: readiness-example
spec:
selector:
app: readiness-example
ports:
- port: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: readiness-example
spec:
selector:
matchLabels:
app: readiness-example
replicas: 1
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
app: readiness-example
spec:
containers:
- name: readiness-example
image: dbdock/readiness-example:1.0.0
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 400Mi
cpu: 400m
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 40
timeoutSeconds: 2
periodSeconds: 3
failureThreshold: 5
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 100
timeoutSeconds: 2
periodSeconds: 8
failureThreshold: 1