Create 14-10-redis.yaml
This commit is contained in:
parent
c14b6e4748
commit
5f87f8be3a
37
14-10-redis.yaml
Normal file
37
14-10-redis.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
serviceName: redis
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- command: [sh, -c, source /redis-config/init.sh ]
|
||||||
|
image: redis:3.2.7-alpine
|
||||||
|
name: redis
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
name: redis
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /redis-config
|
||||||
|
name: config
|
||||||
|
- mountPath: /redis-data
|
||||||
|
name: data
|
||||||
|
- command: [sh, -c, source /redis-config/sentinel.sh]
|
||||||
|
image: redis:3.2.7-alpine
|
||||||
|
name: sentinel
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /redis-config
|
||||||
|
name: config
|
||||||
|
volumes:
|
||||||
|
- configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
name: redis-config
|
||||||
|
name: config
|
||||||
|
- emptyDir:
|
||||||
|
name: data
|
||||||
Loading…
Reference in New Issue
Block a user