Skip to content

Instantly share code, notes, and snippets.

@harsh4870
Created June 9, 2019 20:24
Show Gist options
  • Save harsh4870/cf65f544e0ecdb1d14f1e17c4a24dbdf to your computer and use it in GitHub Desktop.
Save harsh4870/cf65f544e0ecdb1d14f1e17c4a24dbdf to your computer and use it in GitHub Desktop.
Redis rejson statefulset deployment on kubernetes
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", "Password", "--appendonly", "yes", "--save", "900", "1", "--save", "30", "2", "--loadmodule", "/usr/lib/redis/modules/rejson.so"]
ports:
- containerPort: 6379
name: redis
resources:
limits:
cpu: .15
memory: 1024Mi
requests:
cpu: .10
memory: 1024Mi
volumeMounts:
- name: redis-volume
mountPath: /data
volumeClaimTemplates:
- metadata:
name: redis-volume
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment