-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathredis.yaml
45 lines (44 loc) · 847 Bytes
/
redis.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
---
apiVersion: apps/v1
#kind: StatefulSet
kind: Deployment
metadata:
name: redis-deployment
spec:
selector:
matchLabels:
app: redis
# required by statefulset
#serviceName: redis
replicas: 1
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis
ports:
- containerPort: 6379
# required by statefulset
#name: redis-service
volumeMounts:
- name: redis-volume
mountPath: /data
volumes:
- name: redis-volume
persistentVolumeClaim:
claimName: redis-volume-claim
---
apiVersion: v1
kind: Service
metadata:
name: redis-service
spec:
ports:
- port: 6379
# required by statefulset
#clusterIP: None
selector:
app: redis