A Kubernetes operator for Redis built around the same control-plane ideas used by CloudNativePG: direct pod/PVC management, a split control/data architecture, and deterministic failover behavior.
- Manages Redis clusters through Kubernetes CRDs (
RedisCluster,RedisBackup,RedisScheduledBackup) - Handles bootstrap, scaling, rolling updates, and failover
- Exposes stable service endpoints per cluster:
- Standalone/sentinel modes:
<name>-leader(current primary)<name>-replica(replicas)<name>-any(all data pods)<name>-sentinel(sentinel mode only)
- Cluster mode:
<name>-any(all data pods)<name>-cluster(headless cluster discovery/bus service)
- Standalone/sentinel modes:
- Supports backup and scheduled backup workflows
- Includes operational runbooks for common failure scenarios
This operator follows the same core pattern as CNPG:
- No StatefulSet for data pods; the reconciler manages Pods and PVCs directly
- Single binary, two roles:
redis-operator controller(controller-manager)redis-operator instance(in-pod instance manager as PID 1)
- Instance managers report per-pod status and execute pod-local operations over HTTP
- Controller remains authoritative for desired state via CRD status/spec
Why this matters: the operator can enforce strict pod update ordering, explicit fencing, and controlled failover/switchover sequences instead of delegating behavior to generic controllers.
- Replication topology: primary + replicas (Redis native replication)
- Failover safety:
- Fencing-first failover flow to reduce split-brain risk
- Boot-time split-brain guard in instance manager: non-primary pods always come up as replicas of
status.currentPrimary
- Rolling updates:
- Replicas updated first
- Primary updated last with switchover sequencing
- Secrets/config:
- If
spec.authSecretis omitted, the operator creates<cluster>-auth, persistsspec.authSecret, and enforces Redis authentication - Secrets are mounted via projected volumes and tracked with resource versions in status
- Secret updates trigger reconciliation and in-pod config refresh logic
- If
| Mode | Status |
|---|---|
standalone |
Supported |
sentinel |
Supported (requires at least 3 data instances) |
cluster |
Supported |
Set a release version once:
VERSION="v0.1.5"Option A: one command with Kustomize (CRDs + RBAC + controller + webhooks).
kubectl apply -k "github.com/howl-cloud/redis-operator/config/default?ref=${VERSION}"Option B: Helm OCI chart.
Charts are published to GHCR at ghcr.io/howl-cloud/charts/redis-operator on version tags.
Install CRDs first:
kubectl apply -f "https://raw.githubusercontent.com/howl-cloud/redis-operator/${VERSION}/config/crd/bases/redis.io_redisclusters.yaml"
kubectl apply -f "https://raw.githubusercontent.com/howl-cloud/redis-operator/${VERSION}/config/crd/bases/redis.io_redisbackups.yaml"
kubectl apply -f "https://raw.githubusercontent.com/howl-cloud/redis-operator/${VERSION}/config/crd/bases/redis.io_redisscheduledbackups.yaml"Install the chart:
helm upgrade --install redis-operator oci://ghcr.io/howl-cloud/charts/redis-operator \
--version "${VERSION#v}" \
--namespace redis-operator-system \
--create-namespaceOption C: Helm chart from local checkout.
Install CRDs first (same as above), then:
helm upgrade --install redis-operator ./charts/redis-operator \
--namespace redis-operator-system \
--create-namespaceapiVersion: redis.io/v1
kind: RedisCluster
metadata:
name: my-redis
namespace: default
spec:
instances: 3
mode: standalone
storage:
size: 1Gikubectl apply -f rediscluster.yaml
kubectl wait --for=condition=Ready rediscluster/my-redis -n default --timeout=10mPASSWORD=$(kubectl get secret my-redis-auth -n default -o jsonpath='{.data.password}' | base64 -d)
kubectl port-forward svc/my-redis-leader 6379:6379 -n default
redis-cli -a "$PASSWORD" -h 127.0.0.1 -p 6379 pingRedisCluster: cluster lifecycle, topology, resources, secrets, scheduling rulesRedisBackup: one-off backup executionRedisScheduledBackup: cron-driven backup scheduling
- Architecture and component docs:
internal/controller/cluster/README.md,internal/instance-manager/README.md - Runbooks:
docs/runbooks/index.md - Upgrade guidance:
docs/upgrade.md - Contributor guide:
CONTRIBUTING.md
- Horizon Web Labs.