Created
June 9, 2019 20:24
-
-
Save harsh4870/cf65f544e0ecdb1d14f1e17c4a24dbdf to your computer and use it in GitHub Desktop.
Redis rejson statefulset deployment on kubernetes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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