Box

Allgemein

Profil

Aktionen

Minimal Redis from Operator » Historie » Revision 4

« Zurück | Revision 4/9 (Vergleich) | Weiter »
Peter Pfläging, 11.04.2022 08:52


Minimal Redis from Operator

Very much new workload inside OPenShift / OKD or Kubernetes using Redis as distributed cache or session storage.

To address this there's an operator (https://ot-container-kit.github.io/redis-operator/)

It's best to use a reald redis cluster. CPU and Memory usage is typically low:

  • Top of 0.6 CPU, 0.7 Gig memory and 6 pods
  • Average of 0.1 CPU and less than 0.1 Gig memory

All values for a 3 count stateful set.

If you're using 1 Gig storage PVC's you're ending with 6 Gig storage consumption ;-)

Install

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: redis-operator
namespace: openshift-operators
spec:
channel: stable
installPlanApproval: Automatic
name: redis-operator
source: community-operators
sourceNamespace: openshift-marketplace



```yaml
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
name: redis-cluster
spec:
clusterSize: 3
kubernetesConfig:
 image: 'quay.io/opstree/redis:v6.2.5'
 imagePullPolicy: IfNotPresent
 resources:
   limits:
     cpu: 101m
     memory: 128Mi
   requests:
     cpu: 101m
     memory: 128Mi
 serviceType: ClusterIP
redisExporter:
 enabled: false
 image: 'quay.io/opstree/redis-exporter:1.0'
redisFollower:
 serviceType: ClusterIP
redisLeader:
 serviceType: ClusterIP
storage:
 volumeClaimTemplate:
   spec:
     accessModes:
       - ReadWriteOnce
     resources:
       requests:
         storage: 1Gi
     storageClassName: rook-ceph-block

Von Peter Pfläging vor etwa 3 Jahren aktualisiert · 9 Revisionen