redis

by CloudPirates

Helm chartv0.42.0App 8.10.3Apache-2.0Verified publisher

An open source, in-memory data structure store used as a database, cache, and message broker.

About this chart

Redis Helm Chart

An open source, in-memory data structure store used as a database, cache, and message broker.

Quick Start

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installation

Add the CloudPirates repository:

To install the chart with the release name my-redis:

helm install my-redis oci://registry-1.docker.io/cloudpirates/redis

To install with custom values:

helm install my-redis oci://registry-1.docker.io/cloudpirates/redis -f my-values.yaml

Or install directly from the local chart:

helm install my-redis ./charts/redis

Getting Started

  1. Get the Redis connection details:
# Get password
kubectl get secret my-redis -o jsonpath="{.data.redis-password}" | base64 -d

# Get full connection URI
kubectl get secret my-redis -o jsonpath="{.data.uri}" | base64 -d

# Get individual connection fields
kubectl get secret my-redis -o jsonpath="{.data.host}" | base64 -d
kubectl get secret my-redis -o jsonpath="{.data.port}" | base64 -d
kubectl get secret my-redis -o jsonpath="{.data.username}" | base64 -d
  1. Connect to Redis from inside the cluster:
kubectl run redis-client --rm --tty -i --restart='Never' \
    --image redis:8.2.0 -- bash

# Inside the pod:
REDISCLI_AUTH="$REDIS_PASSWORD" redis-cli -h my-redis

Security & Signature Verification

This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.

Public Key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----

To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:

cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/redis:<version>

Configuration

Global parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registry override""
global.imagePullSecretsGlobal Docker registry secret names[]

Image Configuration

ParameterDescriptionDefault
image.registryRedis image registrydocker.io
image.repositoryRedis image repositoryredis
image.tagRedis image tag8.4.0@sha256:43355efd22490e31ca14b9d569367d05121e2be61fd8e47937563ae2a80952ae
image.pullPolicyImage pull policyAlways

Common Parameters

ParameterDescriptionDefault
nameOverrideString to partially override redis.fullname""
fullnameOverrideString to fully override redis.fullname""
namespaceOverrideString to override the namespace for all resources""
clusterDomainKubernetes cluster domaincluster.local
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
architectureRedis architecture. standalone: Single instance, cluster: Multi-master cluster, replication: Master-replica (use sentinel.enabled to control automatic failover)standalone
replicaCountNumber of Redis instances (when architecture=replication|cluster). As cluster or replication with Sentinel: total instances. Replication without Sentinel: 1 master + (n-1) replicas3
clusterReplicaCountNumber of replicas to be created for each master when architecture=cluster.0
revisionHistoryLimitNumber of revisions to keep in history for rollback (set to 0 for unlimited)10

Pod labels and annotations

ParameterDescriptionDefault
podLabelsMap of labels to add to the pods{}
podAnnotationsMap of annotations to add to the pods{}

Service Configuration

ParameterDescriptionDefault
service.annotationsKubernetes service annotations{}
service.typeKubernetes service typeClusterIP
service.portRedis service port6379
service.nodePortNodePort value for NodePort and LoadBalancer service types""
service.clusterPortRedis cluster service port16379

Authentication

ParameterDescriptionDefault
auth.enabledEnable Redis authenticationtrue
auth.sentinelEnable authentication for Redis sentinels using the shared Redis password (with auth.acl, the auth.acl.defaultUsername user's password)true
auth.metricsEnable authentication for Redis metrics sidecartrue
auth.passwordRedis password (if empty, random password will be generated)""
auth.existingSecretName of existing secret containing Redis password""
auth.existingSecretPasswordKeyKey in existing secret containing Redis password""
auth.acl.enabledEnable custom ACL rules from a secret filefalse
auth.acl.existingSecretName of existing secret containing ACL rules""
auth.acl.existingSecretACLKeyKey in existing secret containing ACL rules""
auth.acl.existingFilePathPath to existing ACL file injected by Vault Agent Injector (mutually exclusive with existingSecret)""
auth.acl.defaultUsernameACL username in the ACL file used as the main/default Redis user (e.g. for probes and clients)default
auth.acl.sentinelUsernameACL username in the ACL file Sentinel uses to authenticate to the monitored Redis instancessentinel

Connection Details Secret

When auth.enabled is true and no auth.existingSecret or auth.acl.enabled is set, the chart creates a Secret containing full connection details:

KeyDescription
redis-passwordThe Redis password (base64 encoded)
hostThe Redis service hostname: <fullname>.<namespace>.svc (base64 encoded)
portThe Redis service port (base64 encoded). Uses tls.port when TLS is enabled
usernameThe Redis username: default (base64 encoded)
uriFull connection URI: redis://default:<password>@<host>:<port> (base64 encoded). Uses rediss:// scheme when TLS is enabled

ACL Configuration

Redis ACL (Access Control List) allows fine-grained access control with user-specific permissions. When ACL is enabled, all users including the 'default' user must be explicitly configured in the ACL file.

Using Kubernetes Secret (existingSecret):

auth:
  acl:
    enabled: true
    existingSecret: "my-redis-acl"
    existingSecretACLKey: "users.acl"

Using Vault Agent Injector (existingFilePath):

auth:
  acl:
    enabled: true
    existingFilePath: "/vault/secrets/redis-acl"

ACL File Format Example:

user default on >masterpassword ~* &* +@all
user readonly on >readonlypassword ~* +@read
user sentinel on >sentinelpassword allchannels +multi +slaveof +ping +exec +subscribe +config|rewrite +role +publish +info +client|setname +client|kill +script|kill

Notes:

  • existingSecret and existingFilePath are mutually exclusive
  • When using existingFilePath, no volume mounting is performed - the file must be available at the specified path
  • The ACL file must contain at least the user named by auth.acl.defaultUsername (default unless overridden)
  • For Sentinel deployments, include a user named by auth.acl.sentinelUsername (sentinel unless overridden), or the defaultUsername user will be used instead. Sentinel logs in to Redis as this user, so it needs the monitoring permissions shown in the example above (from the Redis Sentinel docs); without them Sentinel cannot detect failures or fail over
  • auth.acl.sentinelUsername only covers Sentinel's connections to Redis. With auth.sentinel, clients connect to the Sentinel port with the defaultUsername user's password; use Sentinel ACL Configuration for separate Sentinel credentials
  • This is separate from Sentinel's own ACL, which secures connections to the Sentinel process itself - see Sentinel ACL Configuration

TLS/SSL Configuration

ParameterDescriptionDefault
tls.enabledEnable TLS/SSL for Redis connectionsfalse
tls.existingSecretName of an existing secret containing TLS certificates (expected keys: tls.crt, tls.key, ca.crt)""
tls.certFilenameServer certificate filename in the secrettls.crt
tls.certKeyFilenameServer certificate key filename in the secrettls.key
tls.certCAFilenameCA certificate filename in the secretca.crt
tls.portTLS port for Redis6380
tls.authClientsRequire clients to authenticate with a valid client certificatetrue
tls.client.existingSecretName of an existing secret containing client TLS certificates (expected keys: tls.crt, tls.key). Used for probes.""
tls.client.certFilenameClient certificate filename in the secrettls.crt
tls.client.certKeyFilenameClient certificate key filename in the secrettls.key

Redis Configuration

| Parameter | Description | Default | | ----------------

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 v0.42.0 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