<p>I am using <a href="https://hub.docker.com/r/redislabs/rejson/" rel="nofollow noreferrer">https://hub.docker.com/r/redislabs/rejson/</a></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/rejson
          args: ["--requirepass", "pass", "--appendonly", "yes", "--save", "900", "1", "--save", "30", "2"]
          ports:
            - containerPort: 6379
              name: redis
          volumeMounts:
            - name: redis-volume
              mountPath: /data
  volumeClaimTemplates:
  - metadata:
      name: redis-volume
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 1Gi
</code></pre>

<p>I am passing arg to kubernetes config for persistense data store with <code>"--appendonly", "yes"</code> </p>

<p>if i am not passing arg it is running with </p>

<pre><code>`redis-cli:6379 &gt; JSON.SET foo . '"bar"'`
OK
</code></pre>

<p>if i pass arg to kubernetes config it is generating error and json module in redis not working</p>

<pre><code>`redis-cli:6379 &gt; JSON.SET foo . '"bar"'`
(error) ERR unknown command `JSON.SET`, with args beginning with: `foo`, `.`, `"bar"`,
</code></pre>

<p>I am following this : <a href="https://estl.tech/deploying-redis-with-persistence-on-google-kubernetes-engine-c1d60f70a043" rel="nofollow noreferrer">https://estl.tech/deploying-redis-with-persistence-on-google-kubernetes-engine-c1d60f70a043</a></p>

Harsh Manvar
<p>The <code>redislabs/rejson</code> image needs to have the <code>loadmodule</code> switch as a CMD argument as well - this should work:</p>

<pre><code>...
      args: ["--requirepass", "pass", "--appendonly", "yes", "--save", "900", "1", "--save", "30", "2", "--loadmodule", "/usr/lib/redis/modules/rejson.so"]
...
</code></pre>
