-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathstatefulset.yml
45 lines (45 loc) · 852 Bytes
/
statefulset.yml
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
apiVersion: v1
kind: Service
metadata:
name: hello-world
labels:
app: hello-world-sts
spec:
clusterIP: None
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: hello-world-sts
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hello-world
annotations:
kubernetes.io/change-cause: ver1
spec:
serviceName: hello-world
selector:
matchLabels:
app: hello-world-sts
replicas: 10
template:
metadata:
labels:
app: hello-world-sts
svc: example
spec:
containers:
- name: hello-world
image: ahmadrafiee/go-hello-world:1
ports:
- containerPort: 80
resources:
requests:
cpu: 10m
memory: 10Mi
limits:
memory: 20Mi
cpu: 20m