kubernetes-up-and-running/17-11-redis.yaml
kammous 4f5c952545 Rename all files accordingly to kuard 2nd edition
- Move all objects, except for chapter 17 from v1beta to v1
- Fix an error on kuard image for Job chapter (#12)
2020-04-04 13:58:19 +02:00

41 lines
893 B
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
spec:
replicas: 3
selector:
matchLabels:
app: redis
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