From 10de001191d3d938898993f24c127d72c72d5b33 Mon Sep 17 00:00:00 2001 From: Eddie Arrage Date: Wed, 4 Apr 2018 00:28:12 +0000 Subject: Add existing public redis pod/service - Use a community yaml for redis in k8s as simple data store - Redis can be used for tracing and also by the snort-ids to store alerts that can be processed by other services - If flannel is used, the redis CLI can be accessed on the host OS with redis-cli -h - Within the k8s cluster, the redis service can be accessed with DNS using name 'redis' - The same yaml for redis is also included in toplevel manifest for SDC scenario. Included here if intention is to use separately (tracing only) Change-Id: Ibad283a4cc8938fe01f5de6b7743bdb5511be3af Signed-off-by: Eddie Arrage (cherry picked from commit 66cc1be27b7fbb27c01a726663e42608eb411672) --- clover/tools/yaml/redis.yaml | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 clover/tools/yaml/redis.yaml diff --git a/clover/tools/yaml/redis.yaml b/clover/tools/yaml/redis.yaml new file mode 100644 index 0000000..8a05495 --- /dev/null +++ b/clover/tools/yaml/redis.yaml @@ -0,0 +1,45 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis + redis-sentinel: "true" + role: master + name: redis +spec: + containers: + - name: redis + image: k8s.gcr.io/redis:v1 + env: + - name: MASTER + value: "true" + ports: + - containerPort: 6379 + resources: + limits: + cpu: "0.1" + volumeMounts: + - mountPath: /redis-master-data + name: data + - name: sentinel + image: kubernetes/redis:v1 + env: + - name: SENTINEL + value: "true" + ports: + - containerPort: 26379 + volumes: + - name: data + emptyDir: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: redis +spec: + ports: + - port: 6379 + selector: + name: redis +--- -- cgit 1.2.3-korg