redis
by CloudPirates
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
- 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
- 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
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry override | "" |
global.imagePullSecrets | Global Docker registry secret names | [] |
Image Configuration
| Parameter | Description | Default |
|---|---|---|
image.registry | Redis image registry | docker.io |
image.repository | Redis image repository | redis |
image.tag | Redis image tag | 8.4.0@sha256:43355efd22490e31ca14b9d569367d05121e2be61fd8e47937563ae2a80952ae |
image.pullPolicy | Image pull policy | Always |
Common Parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | String to partially override redis.fullname | "" |
fullnameOverride | String to fully override redis.fullname | "" |
namespaceOverride | String to override the namespace for all resources | "" |
clusterDomain | Kubernetes cluster domain | cluster.local |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
architecture | Redis architecture. standalone: Single instance, cluster: Multi-master cluster, replication: Master-replica (use sentinel.enabled to control automatic failover) | standalone |
replicaCount | Number of Redis instances (when architecture=replication|cluster). As cluster or replication with Sentinel: total instances. Replication without Sentinel: 1 master + (n-1) replicas | 3 |
clusterReplicaCount | Number of replicas to be created for each master when architecture=cluster. | 0 |
revisionHistoryLimit | Number of revisions to keep in history for rollback (set to 0 for unlimited) | 10 |
Pod labels and annotations
| Parameter | Description | Default |
|---|---|---|
podLabels | Map of labels to add to the pods | {} |
podAnnotations | Map of annotations to add to the pods | {} |
Service Configuration
| Parameter | Description | Default |
|---|---|---|
service.annotations | Kubernetes service annotations | {} |
service.type | Kubernetes service type | ClusterIP |
service.port | Redis service port | 6379 |
service.nodePort | NodePort value for NodePort and LoadBalancer service types | "" |
service.clusterPort | Redis cluster service port | 16379 |
Authentication
| Parameter | Description | Default |
|---|---|---|
auth.enabled | Enable Redis authentication | true |
auth.sentinel | Enable authentication for Redis sentinels using the shared Redis password (with auth.acl, the auth.acl.defaultUsername user's password) | true |
auth.metrics | Enable authentication for Redis metrics sidecar | true |
auth.password | Redis password (if empty, random password will be generated) | "" |
auth.existingSecret | Name of existing secret containing Redis password | "" |
auth.existingSecretPasswordKey | Key in existing secret containing Redis password | "" |
auth.acl.enabled | Enable custom ACL rules from a secret file | false |
auth.acl.existingSecret | Name of existing secret containing ACL rules | "" |
auth.acl.existingSecretACLKey | Key in existing secret containing ACL rules | "" |
auth.acl.existingFilePath | Path to existing ACL file injected by Vault Agent Injector (mutually exclusive with existingSecret) | "" |
auth.acl.defaultUsername | ACL username in the ACL file used as the main/default Redis user (e.g. for probes and clients) | default |
auth.acl.sentinelUsername | ACL username in the ACL file Sentinel uses to authenticate to the monitored Redis instances | sentinel |
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:
| Key | Description |
|---|---|
redis-password | The Redis password (base64 encoded) |
host | The Redis service hostname: <fullname>.<namespace>.svc (base64 encoded) |
port | The Redis service port (base64 encoded). Uses tls.port when TLS is enabled |
username | The Redis username: default (base64 encoded) |
uri | Full 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:
existingSecretandexistingFilePathare 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(defaultunless overridden) - For Sentinel deployments, include a user named by
auth.acl.sentinelUsername(sentinelunless overridden), or thedefaultUsernameuser 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.sentinelUsernameonly covers Sentinel's connections to Redis. Withauth.sentinel, clients connect to the Sentinel port with thedefaultUsernameuser'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
| Parameter | Description | Default |
|---|---|---|
tls.enabled | Enable TLS/SSL for Redis connections | false |
tls.existingSecret | Name of an existing secret containing TLS certificates (expected keys: tls.crt, tls.key, ca.crt) | "" |
tls.certFilename | Server certificate filename in the secret | tls.crt |
tls.certKeyFilename | Server certificate key filename in the secret | tls.key |
tls.certCAFilename | CA certificate filename in the secret | ca.crt |
tls.port | TLS port for Redis | 6380 |
tls.authClients | Require clients to authenticate with a valid client certificate | true |
tls.client.existingSecret | Name of an existing secret containing client TLS certificates (expected keys: tls.crt, tls.key). Used for probes. | "" |
tls.client.certFilename | Client certificate filename in the secret | tls.crt |
tls.client.certKeyFilename | Client certificate key filename in the secret | tls.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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartredis is pinned at v0.42.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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