<p>I am trying to run a Redis cluster on Kubernetes. I am not planning to persist any Redis data to the disk. Is it possible to run the Redis cluster as Kubernetes deployment and not as a stateful set?</p>

Sashi
<p>yes it is possible to persist data in PVC with stateful sets, however in helm chart for HA redis cluster they are using stateful sets only :</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: redis
spec:
  ports:
    - port: 6379
      name: redis
  clusterIP: None
  selector:
    app: redis
---
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
  name: redis
spec:
  selector:
    matchLabels:
      app: redis  
  serviceName: redis
  replicas: 1
  template:
    metadata:
      labels:
        app: redis 
    spec:
      containers:
        - name: redis
          image: redislabs/redis
          args: ["--requirepass", "admin", "--appendonly", "yes", "--save", "900", "1", "--save", "30", "2"]
          ports:
            - containerPort: 6379
              name: redis
          resources:
            limits:
              cpu: .50
              memory: 1500Mi
            requests:
              cpu: .25
              memory: 1024Mi
          volumeMounts:
            - name: redis-volume
              mountPath: /data
  volumeClaimTemplates:
  - metadata:
      name: redis-volume
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 20Gi
</code></pre>
