From 5f87f8be3a8752243d51e46aaca2c9ed4a74b889 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Sat, 19 Aug 2017 22:10:34 -0700 Subject: [PATCH] Create 14-10-redis.yaml --- 14-10-redis.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 14-10-redis.yaml diff --git a/14-10-redis.yaml b/14-10-redis.yaml new file mode 100644 index 0000000..2a8cd58 --- /dev/null +++ b/14-10-redis.yaml @@ -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