-
Notifications
You must be signed in to change notification settings - Fork 2
/
04_statefulset.yaml
51 lines (51 loc) · 1.19 KB
/
04_statefulset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: workshop-example
labels:
app: workshop-app-example
name: workshop-app-example
spec:
serviceName: workshop-example-headless
replicas: 1
selector:
matchLabels:
name: workshop-app-example
template:
metadata:
annotations:
workshop: k8s-workshop-episode-2
date: "2020-05-27"
labels:
name: workshop-app-example
code: $CODE
spec:
containers:
- name: workshop-app-example
image: "eu.gcr.io/k8s-workshop-2/app:latest"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: CODE
value: "$CODE"
- name: WORKSHOP_USERNAME
value: "k8s-workshop"
livenessProbe:
httpGet:
path: /live
port: http
readinessProbe:
httpGet:
path: /ready
port: http
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi