Overview
Redis is a high-performance in-memory data store used as a cache, session store, message broker and queue backend. This template deploys a master-replica Redis cluster fronted by Redis Sentinel, which elects a new master automatically when the current one fails and gives clients a stable address to discover it. Oneengine knob runs both tiers on Valkey, the BSD-licensed fork of Redis, instead; leaving it alone changes nothing. For development and testing, mode: dev runs a single Redis node with no Sentinel and no failover instead.
What Gets Created
Prerequisites
None for a default install. Three optional features need something to exist first:Optional: bring your own password secret
redis.auth.password creates the password secret for you. To supply the password from a secret you manage instead, create a dictionary secret whose key matches passwordKey (default password) before installing. Use a separate secret for the Sentinel tier if you enable sentinel.auth.fromSecret.redis.auth.fromSecret.name (and sentinel.auth.fromSecret.name) to this name and fromSecret.enabled to true. See Authentication.Optional: public TCP access
Optional: scheduled backups
Installation
A default install needs no values:UI
CLI
Terraform
Pulumi
Configuration
Mode
production(default) runsredis.replicasRedis nodes and a Sentinel quorum that fails over automatically. Everything else on this page describes this mode unless it says otherwise.devruns one Redis node that boots as a plain master, with no Sentinel tier at all. It has no failover and is not for production: a restart or reschedule means the database is down until the node returns. Use it for development and testing.
redis.replicasand every othersentinelsetting are ignored; the Redis workload always runs one node.- Sentinel public access, persistence and authentication are refused at render. Keep
sentinel.publicAccess.enabled,sentinel.persistence.enabled,sentinel.auth.password.enabledandsentinel.auth.fromSecret.enabledset tofalse; the Redis password isredis.auth. - Turn on
redis.persistence.enabledat install if your data must survive restarts and upgrades. Without it the data lives in memory only, and persistence cannot be added to a running release later. - Everything else works the same as in production mode: authentication, persistence, the metrics exporter, backups, the Valkey engine, the firewall settings and Redis public access (one public port,
6380). Withworkload-listand backups on, addRELEASE_NAME-redis-backuptoinboundAllowWorkload, or the backup job cannot reach Redis. - Clients connect directly to
RELEASE_NAME-redis.GVC_NAME.cpln.local:6379. There is no Sentinel to query, so a client configured for Sentinel discovery cannot connect. See Connecting.
Engine
engine: valkey moves the Redis and Sentinel workloads onto valkeyImage together; a Redis-Sentinel / Valkey-server hybrid cannot be produced. Nothing else changes: the Valkey image ships redis-server, redis-cli and redis-sentinel compatibility symlinks, so every command and config directive on this page applies to both engines. Valkey reports redis_version:7.2.4 in INFO for client compatibility and carries its real version in server_name and valkey_version; check that before switching if your client library gates features on redis_version.
Redis
Image and Resources
Authentication
Authentication is off by default. Enable exactly one method per tier; the chart refuses to render with both enabled. In production mode the Sentinel tier takes the same two options undersentinel.auth; dev mode uses redis.auth only and refuses sentinel.auth.
Public Access and Firewall
- Enable the Dedicated Load Balancer on your GVC — required for arbitrary TCP port routing. It is under the GVC’s settings in the console.
- Create the DNS records before deploying — ownership is verified when the domain resource is first created, and the deploy fails with
Unable to apply domainif they are missing. Disable any proxying: TCP must pass straight through.
- Set
external_inboundAllowCIDRon each tier you expose. Without it the workload’s external firewall stays closed and the domain routes nowhere.
6380 + N, Sentinel replica N on 26380 + N. In dev mode the single Redis node is on 6380.
Firewall changes take a few minutes to take effect; re-check before concluding a rule is not working.
Replication and Probes
initialDelaySeconds + 30 × periodSeconds (160 seconds by default). With persistence enabled and a large dataset, a replica must load its AOF before it can sync, so raise periodSeconds to widen the window — for example initialDelaySeconds: 35 and periodSeconds: 20 gives 635 seconds.
Metrics Exporter
:9121/metrics on each Redis replica and the metrics appear in the console. dropMetrics takes regular expressions matched against metric names, for filtering high-cardinality series such as redis_commands_latencies_usec_bucket before they are stored. The exporter authenticates with the Redis password automatically when auth is enabled.
Persistence
redis.dataDir on a volume set with both AOF and RDB persistence on, so data survives restarts and redeployments. Lifecycle hooks remove orphaned temporary RDB and AOF-rewrite files on every container start and stop. Without persistence the data lives in memory and on the container’s ephemeral filesystem only.
Sentinel
The Sentinel tier exists in production mode only. In dev mode the wholesentinel block is ignored, except that Sentinel public access, persistence and authentication must stay off.
mymaster, marks it down after 5 seconds without a response, and promotes a replica once a quorum of Sentinels agrees. Enable sentinel.persistence in production: without it, a Sentinel that restarts forgets which replica was promoted and answers from its static config (replica 0) until it re-learns the cluster.
Backup
Grafana Dashboard
GrafanaDashboard custom resource for clusters running the Grafana Operator. On Control Plane’s managed platform there is no operator to reconcile it, so leave it disabled there. The Redis-specific panels need redis.exporter.enabled: true.
Connecting
mymaster rather than at a specific Redis replica: the master moves during failovers and rolling upgrades, and writes sent to a replica are refused with READONLY You can't write against a read only replica.
In dev mode, point it directly at RELEASE_NAME-redis.GVC_NAME.cpln.local:6379.
To verify the deployment, ask a data node to respond and, in production mode, ask Sentinel which node is the master (add -a PASSWORD when auth is enabled):
redis-cli INFO server the same way: Valkey answers with server_name:valkey and a valkey_version line, Redis has neither.
With public access enabled, connect from outside with the standard client, one port per replica:
Operations
Backing Up
Backups are off by default. Whenbackup.enabled is true, a cron workload runs on backup.schedule, takes an RDB snapshot of the cluster and uploads it to your bucket as PREFIX/redis-YYYY-MM-DDTHH-MM-SSZ.rdb.gz. The job authenticates to the bucket through the Redis identity’s cloud account binding — no static keys. Step schedules such as */30 * * * * are supported.
backup.provider between aws and gcp on an existing release leaves the previous provider’s cloud binding on RELEASE_NAME-redis-identity: the rendered manifest is correct, but identity updates are merged rather than replaced. If least privilege matters to you, inspect the identity in the console after a provider switch and remove the stale binding, or reinstall the release.AWS S3
- Create an S3 bucket. Set
backup.aws.bucketto its name andbackup.aws.regionto its region. - Create a cloud account for your AWS account if you do not have one. Set
backup.aws.cloudAccountNameto its name. - Create an IAM policy with the following JSON, replacing
YOUR_BUCKET_NAME, and setbackup.aws.policyNameto its name:
- Set
backup.aws.prefixto the folder path where backups will be stored, then setbackup.enabled: trueandbackup.provider: aws.
GCS
- Create a GCS bucket. Set
backup.gcp.bucketto its name. - Create a cloud account for your GCP project if you do not have one. Set
backup.gcp.cloudAccountNameto its name. - Grant the Storage Admin role to the GCP service account associated with the cloud account.
- Set
backup.gcp.prefixto the folder path where backups will be stored, then setbackup.enabled: trueandbackup.provider: gcp.
Restoring a Backup
What the backup is: a standard, gzipped RDB file, and RDB files are portable. The upstream-documented way to read one is to start a standalone Redis or Valkey server with AOF disabled and the decompressed file in place as itsdump.rdb (or, on Redis 8.10 and later, with the startup-only preload-file rdb:/path/to/file.rdb setting described under Restoring a backup in the Redis persistence documentation), for example on a local machine with Docker. From there you can inspect the data or replay it into your cluster with your own tooling. Loading the file into this template’s cluster in place has not been tested; if you need that path, test it against a throwaway release before relying on it.
If you enabled redis.persistence, the volume set also takes its own scheduled snapshots on redis.persistence.volumes.data.snapshots.schedule; those are managed through the volume set, independently of the bucket backups.
Upgrading from an Earlier Version
- From 3.7.x — no values changes needed.
modedefaults toproduction, which deploys the same topology as 3.7.x. Every Redis and Sentinel replica restarts once during the rolling upgrade, which moves the master through one Sentinel failover. Withredis.persistence.enabled, data is kept. - From 3.5.1 or earlier — resource keys were renamed. Blocks that expose both a reservation and a limit now name the limit
maxCpu/maxMemoryinstead ofcpu/memory:redis.resources,sentinel.resourcesandredis.exporter.resources. Rename them in your values before upgrading; an upgrade that still carries the old names is refused at render withredis.resources.cpu was RENAMED to redis.resources.maxCpu.backup.resources, which exposes only a limit, keeps barecpu/memory. - From 3.5.0 or earlier with AWS backups — permissions narrowed. Version 3.5.1 removed the AWS managed policy
ReadOnlyAccessfrom the backup identity. It granted read access to every bucket in your account and had been silently supplying any read action your own policy omitted. Update your IAM policy to the full action list under Backing Up before upgrading; if it already matches, nothing changes. - From 3.4.x — Redis 7.4 to Redis 8 is one-way. Version 3.5.0 moved the default image to
redis:8. Redis 8 reads 7.4 data directly, so an upgrade with persistence enabled keeps your data, but once a node has written under Redis 8 a 7.4 image can no longer load it. Snapshot the volume set first if you want a rollback path, or pinredis.imageandsentinel.imagetoredis:7.4.
READONLY errors.
Moving from Dev to Production
Run ahelm upgrade on the same release with mode set to production and every other value exactly as you installed it (in particular redis.persistence.enabled and redis.auth). If you installed with a values file, change mode in it:
--set flags, repeat every one of them and replace mode=dev:
cpln helm get values: it returns --set values as flat dotted keys, which -f ignores, so persistence and authentication would fall back to their defaults.
What happens:
- The new replicas start and copy node 0, with or without persistence, while the dev node keeps serving.
- Node 0 then restarts and Sentinel fails over to one of the new nodes, so the master ends up on node 1 or 2. This failover is expected and your data is kept.
- Sentinel-aware clients see a write gap of a few seconds during the failover.
RELEASE_NAME-sentinel.GVC_NAME.cpln.local:26379, master name mymaster) as described under Connecting. A client left on the Redis address can land on a read replica and get READONLY errors.
Scaling and Availability
- The default shape is already highly available: three data nodes (one master, two replicas) and three Sentinels with a quorum of two. Change
redis.replicasandsentinel.replicasto resize either tier; keep the Sentinel count odd. For a single node with no Sentinel and no failover, usemode: devinstead (see Mode). - When the master stops responding, Sentinel marks it down after 5 seconds, elects a replica and repoints the remaining replicas at it. The old master rejoins as a replica when it comes back. Writes pause for the duration of the failover; reads from replicas continue.
- Write capacity is that of a single node: replicas take reads only. For more memory or throughput, raise
redis.resourcesandredis.persistence.volumes.datarather than adding replicas. - Enable
sentinel.persistenceso the elected master survives Sentinel restarts, andredis.persistenceso data survives Redis restarts. Both are install-time choices.
Troubleshooting
Rollout stalls on Replica N will be restarted shortly after enabling persistence
Rollout stalls on Replica N will be restarted shortly after enabling persistence
cpln helm upgrade that turned redis.persistence.enabled or sentinel.persistence.enabled on, every replica reports Replica N will be restarted shortly indefinitely and the volume set’s volumes stay unbound.Cause: a volume set cannot be attached to a release that is already running.Fix: uninstall the release and reinstall it with persistence enabled from the start. Data in a release without persistence lives in memory only, so take a backup first if it matters.Unable to AUTH to MASTER: -WRONGPASS invalid username-password pair or user is disabled.
Unable to AUTH to MASTER: -WRONGPASS invalid username-password pair or user is disabled.
cpln helm upgrade again with the previous password to recover. To change the password, uninstall and reinstall, or accept a planned outage.READONLY You can't write against a read only replica.
READONLY You can't write against a read only replica.
RELEASE_NAME-sentinel.GVC_NAME.cpln.local:26379 with master name mymaster, so it follows the master.Can't handle RDB format version 15 after changing engine
Can't handle RDB format version 15 after changing engine
# Can't handle RDB format version 15 / # Error reading the RDB base file appendonly.aof.1.base.rdb, AOF loading aborted and crash-loops.Cause: engine was changed to valkey on a release whose data directory was written by Redis 8, which Valkey cannot read.Fix: set engine back to redis and upgrade; the rollout halts on the unhealthy replica, so the remaining nodes keep serving throughout. Migrate between engines with dump/restore or replication.Deployment never becomes ready after enabling auth.fromSecret
Deployment never becomes ready after enabling auth.fromSecret
cpln logs returns nothing at all.Cause: the secret named in redis.auth.fromSecret.name or sentinel.auth.fromSecret.name does not exist, so the container never starts.Fix: read the missing secret’s name from status.versions[].message:cpln workload force-redeployment RELEASE_NAME-redis --gvc GVC_NAME to skip the wait.Unable to apply domain when installing with public access
Unable to apply domain when installing with public access
redis.publicAccess.address or sentinel.publicAccess.address.Cause: domain ownership is verified when the resource is first created, and the TXT or CNAME record is missing.Fix: create the records listed under Public Access and Firewall with proxying disabled, wait for DNS to propagate, then install again.Render fails with redis.resources.cpu was RENAMED to redis.resources.maxCpu
Render fails with redis.resources.cpu was RENAMED to redis.resources.maxCpu
cpln helm install or cpln helm upgrade refuses to render and prints this message (or the memory, sentinel or exporter variant).Cause: your values file still uses the pre-3.6.0 key names.Fix: rename cpu to maxCpu and memory to maxMemory under redis.resources, sentinel.resources and redis.exporter.resources.Render fails with cannot be true in dev mode or sentinel.auth cannot be enabled in dev mode
Render fails with cannot be true in dev mode or sentinel.auth cannot be enabled in dev mode
cpln helm install or cpln helm upgrade with mode: dev refuses to render and prints one of:redis: sentinel.publicAccess.enabled cannot be true in dev mode. Dev mode runs no Sentinel, so there is nothing to expose. Set it to false, or use mode: production.redis: sentinel.persistence.enabled cannot be true in dev mode. Dev mode runs no Sentinel, and switching a release to dev would delete the Sentinel volume set. Set it to false, or use mode: production.redis: sentinel.auth cannot be enabled in dev mode. Dev mode runs no Sentinel. Set sentinel.auth.password.enabled and sentinel.auth.fromSecret.enabled to false (the Redis password is redis.auth), or use mode: production.
false, or keep mode: production.Clients can still connect after tightening the firewall
Clients can still connect after tightening the firewall
internal_inboundAllowType or inboundAllowWorkload, previously allowed clients keep connecting.Cause: firewall changes take a few minutes to propagate.Fix: wait and re-test before concluding the rule is not applied.Important Notes
mode: devhas no failover and is not for production. Turn onredis.persistence.enabledat install if dev data must survive restarts and upgrades.- Choose
engineat install time. Switching it on a running release does not migrate anything; Valkey cannot read data written by Redis 8. - Choose persistence at install time. Enabling
redis.persistenceorsentinel.persistenceon a running release stalls the rollout indefinitely; uninstall and reinstall instead. - Never change the password in place. It deadlocks the rolling update; re-apply the previous password to recover and reinstall to change it.
- In production mode, always discover the master through Sentinel (
mymasteratRELEASE_NAME-sentinel.GVC_NAME.cpln.local:26379). A client pinned to replica 0 getsREADONLYerrors after any failover or upgrade. In dev mode, connect toRELEASE_NAME-redis.GVC_NAME.cpln.local:6379directly. - Enable
sentinel.persistencein production so the elected master survives Sentinel restarts. - The Redis 7.4 to 8 upgrade is one-way. Snapshot the volume set before upgrading if you need a rollback path.
- Public access needs the DNS records in place before the first deploy and
external_inboundAllowCIDRuncommented, or the domain is rejected or routes nowhere. - Bucket backups have no verified in-place restore. Treat them as portable RDB files; see Restoring a Backup.