redis

by HelmForge

Helm chartv3.2.2App 8.10.3Apache-2.0Verified publisher

Redis Helm Chart for standalone, replication, sentinel, and cluster topologies

About this chart

Redis

Redis for Kubernetes with explicit support for standalone, replication, sentinel, and cluster topologies.

Install

HTTPS repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install redis helmforge/redis -f values.yaml

OCI registry

helm install redis oci://ghcr.io/helmforgedev/helm/redis -f values.yaml

What this chart covers

  • topology selection with architecture
  • password authentication through generated, inline, existing, or externally reconciled secrets
  • optional External Secrets Operator integration
  • persistence settings by topology
  • internal service DNS customization with clusterDomain
  • dual-stack service fields through service.ipFamilyPolicy and service.ipFamilies
  • optional TLS file wiring for Redis server configuration
  • startup, readiness and liveness probes use the configured Redis port and TLS transport, authenticate through REDISCLI_AUTH, and require PONG
  • optional Redis exporter sidecar and ServiceMonitor
  • optional PodDisruptionBudget
  • topology-specific Services, StatefulSets, and Redis Cluster bootstrap Job
  • dedicated metrics Service so Prometheus ServiceMonitor targets do not duplicate the headless/client Services
  • extraEnv, extraVolumes, extraVolumeMounts, and extraManifests extension points

Supported architectures

ArchitectureContractPrimary resourcesDocument
standaloneOne Redis pod, lowest operational complexity, no HA contractheadless Service, client Service, StatefulSetdocs/standalone.md
replicationOne fixed primary with read replicas, no automatic promotionheadless Service, primary Service, replica Service, primary and replica StatefulSetsdocs/replication.md
sentinelRole-neutral Redis nodes plus Sentinel discovery and automatic failovernode StatefulSet, Sentinel Service, Sentinel StatefulSetdocs/sentinel.md
clusterRedis Cluster sharding and HA for Redis Cluster-compatible clientsheadless Service, client Service, cluster StatefulSet, cluster init Jobdocs/cluster.md

How to choose the architecture

  • Use standalone for development, simple workloads, and systems that do not need Redis-level HA.
  • Use replication when applications can tolerate a fixed primary endpoint and only need read replicas.
  • Use sentinel when clients can query Sentinel and need automatic primary discovery after failover.
  • Use cluster when clients support Redis Cluster and data must be sharded across nodes.

Read the topology document before production use:

  • Standalone
  • Replication
  • Sentinel
  • Cluster

Quick start

Minimal standalone deployment with an existing password Secret:

architecture: standalone

auth:
  enabled: true
  existingSecret: redis-auth
  existingSecretPasswordKey: redis-password

standalone:
  persistence:
    enabled: true
    size: 8Gi

Install:

helm install redis helmforge/redis -f redis-values.yaml

Authentication

The chart supports four credential patterns:

PatternValuesNotes
Generated passwordauth.enabled=true, empty auth.password, empty auth.existingSecretUseful for quick starts. The generated value is stored in the chart-managed Secret.
Inline passwordauth.passwordAcceptable for local testing. Avoid committing real credentials.
Existing Secretauth.existingSecret and auth.existingSecretPasswordKeyRecommended for production when another process owns the Secret.
ExternalSecretexternalSecrets.enabled=true and auth.existingSecretRecommended when External Secrets Operator reconciles the Secret from an external provider.

When externalSecrets.enabled=true, set auth.existingSecret to the same target Secret name. This avoids drift between a chart-managed Secret and an externally reconciled Secret.

Example:

auth:
  enabled: true
  existingSecret: redis-auth
  existingSecretPasswordKey: redis-password

externalSecrets:
  enabled: true
  secretStoreRef:
    name: platform-secrets
    kind: ClusterSecretStore
  data:
    - secretKey: redis-password
      remoteRef:
        key: redis/auth
        property: password

Networking

The chart creates a headless Service for stable StatefulSet pod DNS and topology-specific client Services.

ModeClient-facing service
standalone<release>-redis-client
replication<release>-redis-primary for writes, <release>-redis-replicas for reads
sentinel<release>-redis-sentinel; Sentinel-aware clients discover the elected master
cluster<release>-redis-client

Application listeners and Service ports are separate contracts. Change containerPorts.redis, containerPorts.sentinel, containerPorts.clusterBus, or containerPorts.metrics to move the actual process listener. Change service.ports.* only to alter the client-facing Service port. Services use named target ports, while headless peer discovery uses the container listener directly.

For example, this keeps the Service on 6379 while Redis listens on 6380:

containerPorts:
  redis: 6380

service:
  ports:
    redis: 6379

Cluster mode explicitly configures and announces the cluster bus listener. Keep containerPorts.clusterBus distinct from containerPorts.redis.

Enable ingress isolation when the cluster network plugin enforces NetworkPolicy:

networkPolicy:
  enabled: true
  ingress:
    allowSameNamespace: false
    extraFrom:
      - namespaceSelector:
          matchLabels:
            kubernetes.io/metadata.name: applications

The generated policies always preserve required Redis and Sentinel peer traffic. If same-namespace access is disabled, list every external client and metrics scraper explicitly. In cluster mode without TLS, restrict the cluster bus port to trusted Redis peers because the bus protocol is not authenticated.

Cluster domain

Set clusterDomain when the Kubernetes cluster does not use cluster.local:

clusterDomain: corp.internal

The value is used for internal FQDNs rendered into Redis replication, Sentinel, Redis Cluster announce hostnames, cluster bootstrap commands, and NOTES.txt.

Dual-stack services

Service dual-stack fields are available through:

service:
  ipFamilyPolicy: PreferDualStack
  ipFamilies:
    - IPv4
    - IPv6

Leave these values empty to use the cluster defaults.

Persistence

Persistence is configured under each topology:

  • standalone.persistence
  • replication.primary.persistence
  • replication.replica.persistence
  • node.persistence for role-neutral Sentinel data nodes
  • sentinel.persistence
  • cluster.persistence

Use persistent volumes for production stateful modes. Disable persistence only for ephemeral tests and short-lived environments.

Observability

Enable the Redis exporter sidecar with:

metrics:
  enabled: true

When metrics are enabled, the chart creates a dedicated <release>-redis-metrics Service with app.kubernetes.io/component=metrics. The built-in ServiceMonitor selects only that Service, which avoids duplicate scrape targets from the headless and client-facing Services.

When Prometheus Operator is installed, enable a ServiceMonitor:

metrics:
  enabled: true
  serviceMonitor:
    enabled: true
    labels:
      prometheus: monitoring

Monitor memory usage, connected clients, command latency, replication lag, Sentinel state, and Redis Cluster health depending on the selected topology.

Scheduling and availability

For HA-oriented modes, configure:

  • pdb.enabled=true
  • affinity or pod anti-affinity
  • topologySpreadConstraints
  • resource requests and limits
  • a storage class with the required availability profile

The chart exposes scheduling knobs but does not enforce a single cluster layout. Match these values to your node topology and maintenance policy.

Helper container resources

Besides the main Redis containers, two short-lived helper containers accept their own resources:

  • sentinel.waitForMaster.resources: the wait-for-master init container on each Sentinel data node
  • cluster.initJob.resources: the redis-cli container of the Redis Cluster bootstrap Job

Both default to {}, so no resources block is rendered. Set them when a namespace ResourceQuota or LimitRange requires every container to declare requests and limits:

sentinel:
  waitForMaster:
    resources:
      requests:
        cpu: 50m
        memory: 64Mi
      limits:
        cpu: 200m
        memory: 128Mi

cluster:
  initJob:
    resources:
      requests:
        cpu: 50m
        memory: 64Mi
      limits:
        cpu: 200m
        memory: 128Mi

Extension points

Use the generic extension values when platform-specific integration is needed:

  • commonLabels
  • commonAnnotations
  • podLabels
  • podAnnotations
  • annotations
  • extraEnv
  • extraVolumes
  • extraVolumeMounts
  • extraManifests

extraManifests are rendered with tpl.

Main values

ParameterDescriptionDefault
architectureRedis topology: standalone, replication, sentinel, or clusterstandalone
clusterDomainKubernetes cluster DNS domain used for internal service FQDNscluster.local
image.repositoryRedis image repositorydocker.io/library/redis
image.tagRedis image tag8.10.3
auth.enabledEnable password authenticationtrue
auth.passwordInline Redis password""
auth.existingSecretExisting Secret containing the Redis password""
auth.existingSecretPasswordKeySecret key used for the Redis passwordredis-password
auth.sentinelRequire password authentication on the Sentinel control planefalse
tls.enabledEnable Redis TLS settings. Requires tls.existingSecret.false
standalone.persistence.enabledEnable persistence for standalone modetrue
replication.replicaCountNumber of replica pods in replication mode2
node.replicaCountNumber of role-neutral Redis data nodes in Sentinel mode3
node.persistence.enabledPersist Sentinel data-node AOF/RDB datatrue
sentinel.replicaCountNumber of Sentinel pods3
sentinel.masterSetSentinel master set name used by Sentinel clientsmymaster
sentinel.quorumSentinel quorum2
sentinel.gracefulFailover.enabledRequest failover before voluntary master shutdowntrue
sentinel.gracefulFailover.replicaSyncTimeoutSecondsSeconds the master keeps trying to hand over to an in-sync replica that Sentinel accepts15
sentinel.startupFailoverGuard.enabledPrevent an empty recreated node from resuming as mastertrue
sentinel.waitForMaster.resourcesResource requests and limits for the wait-for-master init container on Sentinel data nodes{}
cluster.nodesNumber of Redis Cluster nodes6
cluster.replicasPerMasterRedis Cluster replicas per master1
cluster.initJob.resourcesResource requests and limits for the redis-cli container in the Redis Cluster bootstrap Job{}
containerPorts.redisRedis process listener port6379
containerPorts.sentinelSentinel process listener port26379
containerPorts.clusterBusRedis Cluster bus listener port16379
containerPorts.metricsredis_exporter listener port9121
service.typeClient Service type where applicableClusterIP
service.ports.redisClient-facing Redis Service port6379
service.ports.sentinelClient-facing Sentinel Service port26379
service.ports.metricsClient-facing metrics Service port9121
service.ipFamilyPolicyService IP family policy for dual-stack clustersnull
service.ipFamiliesService IP families for dual-stack clusters[]
networkPolicy.enabledCreate ingress-only Redis and Sentinel NetworkPoliciesfalse
networkPolicy.ingress.allowSameNamespaceAllow application clients from the release namespacetrue
networkPolicy.ingress.extraFromAdditional client ingress sources[]
networkPolicy.metrics.enabledAllow metrics ingress through the policyfalse
metrics.enabledEnable redis_exporter sidecarfalse
metrics.serviceMonitor.enabledCreate ServiceMonitorfalse
pdb.enabledCreate PodDisruptionBudget for HA modesfalse
externalSecrets.enabledRender an ExternalSecret for the auth Secretfalse
externalSecrets.secretStoreRef.nameSecretStore or ClusterSecretStore name""
extraManifestsExtra Kubernetes manifests rendered with tpl[]

CI scenarios

The ci/ scenarios validate chart behavior across common configurations:

  • standalone.yaml
  • replication.yaml
  • sentinel.yaml
  • cluster.yaml
  • existing-secret.yaml
  • external-secrets.yaml
  • metrics.yaml
  • dual-stack.yaml
  • custom-ports.yaml

Local validation should include:

helm dependency build charts/redis
helm lint charts/redis --strict
helm unittest charts/redis
helm template redis charts/redis
for f in charts/redis/ci/*.yaml; do helm template redis charts/redis -f "$f" >/dev/null; done

Examples

See examples/:

  • standalone-simple.yaml
  • replication-production.yaml
  • cluster.yaml

Operational notes

  • replication and sentinel are different operational contracts.
  • sentinel requires Sentinel-compatible clients for automatic primary discovery.
  • Upgrading Sentinel de

Deploy redis with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redis on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartredis is pinned at v3.2.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply