147 words
1 minute
Deploy Redis Operator in kubernetes
This is my config for how I deployed my redis instance using Redis Operator. This is a fairly barebones implementation. You should for sure read the docs to see all the options you can customize
An operator manages our instances. I didn’t customize the operator and just used all the default settings.
helm repo add ot-helm https://ot-container-kit.github.io/helm-charts
helm repo update
helm upgrade --install redis-operator ot-helm/redis-operator -n default
Once the cluster is set up, all you need to do is deploy a cluster manifest
apiVersion: redis.redis.opstreelabs.in/v1beta2
kind: Redis
metadata:
name: redis
namespace: default
spec:
kubernetesConfig:
image: quay.io/opstree/redis
resources:
requests:
memory: 256Mi
limits:
memory: 256Mi
storage:
volumeClaimTemplate:
spec:
storageClassName: nfs-client
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
podSecurityContext:
runAsUser: 1000
fsGroup: 1000
This will deploy a redis instance with 1 pod. You can deploy a redis cluster as well as sentinel using this operator. This is a very basic example of what it can do
Deploy Redis Operator in kubernetes
https://edwardbeazer.com/posts/deploy-redis-operator-in-kubernetes/