Kubernetes
7 min readSeptember 21, 2026

Redis on Kubernetes: Sentinel vs Cluster Mode Trade-offs

Part ofKubernetes
CO
Coding Protocols Team
Platform Engineering
Redis on Kubernetes: Sentinel vs Cluster Mode Trade-offs

Quick answer

Redis on Kubernetes comes down to one decision made early and hard to reverse later: Sentinel for single-master high availability, or Cluster mode for sharded horizontal scale. Here's what each actually requires operationally, and when self-hosting either beats paying for a managed cache.

7 min read · Kubernetes

Redis on Kubernetes has one decision that's expensive to get wrong: Sentinel or Cluster mode. They solve different problems, they're not interchangeable later without a data migration, and picking the wrong one because it seemed simpler at the time is how teams end up re-architecting their cache layer under load six months in.

Both run on the same underlying primitive — a StatefulSet, for the same reason it fits any stateful workload: stable per-replica network identity (redis-0, redis-1, redis-2) and a PersistentVolumeClaim that survives a pod being rescheduled. For the mechanics of why StatefulSets exist and how volumeClaimTemplates and headless Services work, see Kubernetes StatefulSets: Running Stateful Workloads in Production — this post assumes that foundation and focuses on what's Redis-specific on top of it.


Sentinel: High Availability, No Sharding

Sentinel gives you one primary, N replicas, and automatic failover — the whole dataset lives on one node's memory, replicated to the others.

How failover works: a set of Sentinel processes (deployed separately from the Redis instances themselves, typically as their own Deployment or sidecar) continuously monitor the primary. When a quorum of Sentinels agrees the primary is unreachable, they elect a replica to promote and reconfigure the rest to replicate from it. Clients that support the Sentinel protocol ask the Sentinels for the current primary's address rather than hardcoding it.

The quorum requirement is why you run an odd number of Sentinels — 3 is standard. An even number can split evenly on a network partition and fail to reach a majority decision at all; 3 tolerates one Sentinel being unreachable while still reaching quorum with the other 2.

yaml
1# Simplified Sentinel StatefulSet — 3 replicas for quorum
2apiVersion: apps/v1
3kind: StatefulSet
4metadata:
5  name: redis-sentinel
6spec:
7  serviceName: redis-sentinel
8  replicas: 3
9  selector:
10    matchLabels:
11      app: redis-sentinel
12  template:
13    metadata:
14      labels:
15        app: redis-sentinel
16    spec:
17      containers:
18        - name: sentinel
19          image: redis:7.4-alpine
20          command: ["redis-sentinel", "/etc/sentinel/sentinel.conf"]
21          ports:
22            - containerPort: 26379
23          volumeMounts:
24            - name: config
25              mountPath: /etc/sentinel
26      volumes:
27        - name: config
28          configMap:
29            name: redis-sentinel-config

The real constraint: Sentinel doesn't shard. Your entire working set has to fit in the primary's memory. Scaling reads is easy — add replicas. Scaling writes or total dataset size means moving to Cluster mode, which is not a config change; it's a different topology and, in practice, a data migration.


Cluster Mode: Sharded, Horizontally Scalable

Redis Cluster splits the keyspace into 16384 hash slots, distributed across master nodes. Each key maps to a slot via CRC16(key) % 16384; each master owns a contiguous range of slots and replicates them to its own replica(s).

Minimum viable cluster: 3 masters. Fewer than that and Redis Cluster won't form — the cluster needs enough masters to make slot-range consensus meaningful. Each master should have at least one replica for HA, so a minimal production cluster is realistically 6 nodes (3 masters + 3 replicas).

yaml
1# Minimal per-node Cluster config — repeated across 6 StatefulSet replicas
2apiVersion: v1
3kind: ConfigMap
4metadata:
5  name: redis-cluster-config
6data:
7  redis.conf: |
8    cluster-enabled yes
9    cluster-config-file /data/nodes.conf
10    cluster-node-timeout 5000
11    appendonly yes

After the pods are up, the cluster has to be explicitly formed — Kubernetes doesn't know anything about Redis slot assignment:

bash
1redis-cli --cluster create \
2  redis-cluster-0.redis-cluster:6379 \
3  redis-cluster-1.redis-cluster:6379 \
4  redis-cluster-2.redis-cluster:6379 \
5  redis-cluster-3.redis-cluster:6379 \
6  redis-cluster-4.redis-cluster:6379 \
7  redis-cluster-5.redis-cluster:6379 \
8  --cluster-replicas 1

The real constraint: multi-key operations are restricted to keys in the same hash slot. MGET key1 key2 fails across masters unless both keys share a hash taguser:{1000}:profile and user:{1000}:sessions hash on the {1000} substring only, landing in the same slot deliberately. Transactions (MULTI/EXEC) and Lua scripts have the same restriction. This isn't a bug to work around; it's the trade-off for horizontal scale, and it means Cluster mode changes how your application is allowed to use Redis, not just how the infrastructure is deployed.


Kubernetes Production Readiness Checklist

The pre-launch checks we run before calling a cluster production-ready — probes, resources, RBAC, upgrades, and backups. Plain Markdown you can commit to your repo.

Free. Instant download. You'll also get the occasional deep-dive from the newsletter — unsubscribe anytime.

Operators: Don't Hand-Roll the StatefulSet

Running the raw YAML above works for a demo. In production, Sentinel failover reconfiguration and Cluster resharding are exactly the kind of stateful, multi-step operational logic a Kubernetes Operator exists to automate.

OT-CONTAINER-KIT's redis-operator is the actively maintained option as of 2026 — it supports standalone, replication, Sentinel, and Cluster modes through separate CRDs (RedisSentinel, RedisCluster, RedisReplication), and handles failover reconfiguration and cluster reshaping as part of its reconcile loop rather than leaving it to a human running redis-cli --cluster by hand.

Spotahome's redis-operator was the well-known Sentinel-focused option for years, but its development has gone quiet — check the project's recent commit history before betting a new deployment on it.

For teams that don't want operator lifecycle management at all, the Bitnami Redis Helm chart covers standalone and replication topologies (not full Cluster mode) with a simpler, more static deployment model — a reasonable choice if you only need Sentinel-style HA and don't want another controller running in the cluster.


When to Just Use a Managed Cache Instead

Self-hosting either topology means you own Sentinel quorum health, Cluster slot rebalancing after a node replacement, backup/restore, and version upgrades across a stateful, failover-sensitive system. That's a real, ongoing operational cost — not a one-time setup task.

AWS ElastiCache (Redis OSS-compatible) and MemoryDB, or GCP Memorystore, take that off your plate entirely: managed failover, managed patching, and a control plane that handles the exact quorum/resharding mechanics described above. The trade-off is cost and being tied to the provider's feature/version lag behind upstream Redis releases.

Self-host when: you're already running significant stateful infrastructure on Kubernetes and have the platform team to operate it, you need Cluster-mode topology control the managed service doesn't expose, or you're running on-prem/multi-cloud where a single provider's managed cache isn't an option. Use managed when: the team operating it doesn't want another stateful system to own, or the scale doesn't justify the operational investment yet.


Frequently Asked Questions

Can I migrate from Sentinel to Cluster mode later without downtime?

Not directly — there's no in-place topology conversion. The practical path is standing up a new Cluster-mode deployment alongside the existing Sentinel one, dual-writing or replicating data across (via redis-cli --cluster import tooling or application-level backfill), and cutting clients over once the new cluster is verified. Budget for this as a migration project, not a config change, which is exactly why picking the right topology upfront matters.

Do I need Sentinel if I'm already running Cluster mode?

No. Cluster mode has its own built-in failure detection and replica promotion using the Cluster Bus (gossip protocol between nodes on port 16379 by default) — it doesn't use Sentinel at all. Sentinel and Cluster mode are two independent HA mechanisms for two different topologies, not a stack where one builds on the other.

How much memory overhead does running Redis on Kubernetes add versus bare metal?

Minimal for Redis itself — the process behaves the same regardless of the orchestrator. The overhead that matters is operational: cluster form/reshape operations need enough headroom during a node replacement to avoid triggering Redis's own OOM eviction policies mid-rebalance, and container memory limits must account for Redis's maxmemory setting plus its own process overhead (roughly 10-20% above maxmemory is a safe floor), not equal it exactly.

Should Redis pods use podManagementPolicy: Parallel?

Yes, for Cluster mode — cluster nodes bootstrap independently and don't need the default OrderedReady sequencing StatefulSets use for things like database primaries that must exist before replicas start. For Sentinel-managed replication, OrderedReady is safer since the primary should generally be reachable before replicas attempt to sync from it.


For the broader StatefulSet mechanics this deployment model builds on, see Kubernetes StatefulSets: Running Stateful Workloads in Production. For event-driven autoscaling patterns that often pair with a Redis-backed queue, see KEDA ScaledJob: Event-Driven Batch Processing on Kubernetes.

Running Redis in production and not sure if Sentinel or Cluster mode fits your access patterns? Talk to us at Coding Protocols — we help platform teams pick the right topology before it's expensive to change.

Official References

Was this article helpful?

Be the first to rate this article

Related Topics

Kubernetes
Redis
Sentinel
Redis Cluster
StatefulSets
Databases
Platform Engineering

Found this useful? Share it.

Practice this

Related tools

Read Next