-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatefulset.yaml
More file actions
45 lines (43 loc) · 1007 Bytes
/
statefulset.yaml
File metadata and controls
45 lines (43 loc) · 1007 Bytes
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: apps/v1
kind: StatefulSet
metadata:
name: cache-node
spec:
serviceName: "cache-service"
replicas: 3
selector:
matchLabels:
app: cache
template:
metadata:
labels:
app: cache
spec:
containers:
- name: cache-container
image: my-cache-image:local
imagePullPolicy: Never
command: ["python", "server.py"]
args: ["$(POD_NAME).cache-service:50051"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- containerPort: 50051
name: grpc
- containerPort: 8080
name: http-health
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: 8080
initialDelaySeconds: 5
periodSeconds: 5