Redis#
Warning
This part of the Helm Chart is still influx and may change significantly. Use with caution.
This chapter covers how to deploy a managed Redis cluster using the Opstree Redis Operator.
Prerequisites#
The Opstree Redis Operator must be installed in your Kubernetes cluster before enabling this feature.
Quick Start#
persistence:
redis:
enabled: true
When auth.password is empty, the chart generates a random password in its managed credentials Secret and retains it on upgrades. This creates a 3-node Redis cluster (3 leaders + 3 followers) with:
- Redis v7, persistent storage enabled
- A connection Secret with host, port, password, and a ready-to-use URI
- A Redis exporter sidecar for Prometheus metrics
Full Configuration#
persistence:
redis:
enabled: true
clusterSize: 3 # Nodes per leader/follower role
clusterVersion: v7 # v6 or v7
persistenceEnabled: true
image:
repository: quay.io/opstree/redis
tag: v8.4.2
auth:
password: "my-redis-password"
username: "" # Leave empty for default ACL user
storage:
size: 2Gi
accessModes:
- ReadWriteOnce
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 256Mi
exporter:
enabled: true
image:
repository: quay.io/opstree/redis-exporter
tag: v1.81.0
Connection Secret#
When externalSecret.enabled is false (the default), the chart creates a Secret named <release>-<chart>-redis-credentials containing:
| Key | Description | Example |
|---|---|---|
redis-password |
Authentication password | my-redis-password |
redis-username |
Username (empty if not set) | `` |
redis-host |
Leader service hostname | my-app-redis-leader |
redis-port |
Redis port | 6379 |
redis-uri |
Full connection URI | redis://:my-redis-password@my-app-redis-leader:6379 |
Consuming in Your Application#
Bulk-load all connection details:
envFrom:
- secretRef:
name: my-app-workload-helm-redis-credentials
Or reference specific keys:
env:
REDIS_URL:
valueFrom:
secretKeyRef:
name: my-app-workload-helm-redis-credentials
key: redis-uri
Using an External Secret#
If credentials are managed externally (e.g., via External Secrets Operator):
persistence:
redis:
enabled: true
externalSecret:
enabled: true
password:
name: my-redis-secret
key: redis-password
username:
name: my-redis-secret
key: redis-username
When externalSecret.enabled is true, the chart does not create a credentials Secret.
Custom Redis Configuration#
Pass custom redis.conf directives:
persistence:
redis:
enabled: true
auth:
password: "my-redis-password"
redisConfig:
maxmemory-policy: allkeys-lru
tcp-keepalive: "300"
hz: "10"
Each key-value pair is written to a ConfigMap and applied to the Redis nodes.
Protecting Against Accidental Deletion#
persistence:
redis:
enabled: true
preventDelete: true
auth:
password: "my-redis-password"
Custom Naming#
persistence:
redis:
enabled: true
nameOverride: cache
auth:
password: "my-redis-password"
Resources will use <release>-<chart>-cache instead of the default suffix.
What's Next#
Continue to Observability & Scaling to configure health probes, monitoring, and autoscaling.