Deploy Redis Operator in kubernetes
Deploy and manager a simple redis instance using Redis Operator
Fri, 15 Mar 2024
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 of the options you can customize
An operator manages our instances. I didn’t customize the operator and just used all of 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 setup, 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