forked from corybuecker/redis-stateful-set
-
Notifications
You must be signed in to change notification settings - Fork 0
/
primary.yml
46 lines (46 loc) · 959 Bytes
/
primary.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
46
apiVersion: v1
kind: Service
metadata:
name: redis-primary
labels:
app: redis-primary
spec:
ports:
- port: 6379
name: redis-primary
selector:
app: redis-primary
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: redis-primary
spec:
serviceName: redis-primary
replicas: 1
template:
metadata:
labels:
app: redis-primary
spec:
terminationGracePeriodSeconds: 10
containers:
- name: redis-primary
image: corybuecker/redis:3.2
imagePullPolicy: Always
ports:
- containerPort: 6379
name: redis-primary
volumeMounts:
- name: redis-primary-volume
mountPath: /data
volumeClaimTemplates:
- metadata:
name: redis-primary-volume
annotations:
volume.beta.kubernetes.io/storage-class: "slow"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100Gi