|
2 | 2 | title = "Valkey Helm: The new way to deploy Valkey on Kubernetes" |
3 | 3 | date = 2025-11-05 |
4 | 4 | description = "A guide on why the new Valkey Helm chart exists, how it helps, and how to migrate from Bitnami." |
5 | | -authors = ["maheshcherukumilli"] |
| 5 | +authors = ["sgissi","maheshcherukumilli"] |
6 | 6 | [extra] |
7 | 7 | featured = true |
8 | 8 | featured_image = "/assets/media/featured/valkey-helm.webp" |
9 | 9 | +++ |
10 | 10 |
|
11 | | -Bitnami is changing how it publishes and supports many container images and Helm charts (see [charts issue #35164](https://github.com/bitnami/charts/issues/35164), [charts issue #36215](https://github.com/bitnami/charts/issues/36215), and the [Bitnami Secure Images announcement](https://news.broadcom.com/app-dev/broadcom-introduces-bitnami-secure-images-for-production-ready-containerized-applications)). Some images move behind new terms, and older tags may not be available as before. If your pipelines pull Bitnami charts or images during deploys, you can see rollouts fail (`ImagePullBackOff`, auth/404), clusters drift (staging keeps old cached bits while prod can’t pull or resolves a different tag), and “invisible” upgrades when a moved tag points to a new digest. During incidents, rollbacks slow down or fail because the old image isn’t fetchable. Compliance can break, security patches can stall behind limits or paywalls, and you may face surprise licensing or mirroring costs. Net effect: slower releases, harder debugging, inconsistent environments, and higher operational and business risk. |
| 11 | +Bitnami is changing how it publishes and supports many container images and Helm charts (see [charts issue #35164](https://github.com/bitnami/charts/issues/35164), [charts issue #36215](https://github.com/bitnami/charts/issues/36215), and the [Bitnami Secure Images announcement](https://news.broadcom.com/app-dev/broadcom-introduces-bitnami-secure-images-for-production-ready-containerized-applications)). Some images move behind new terms, and older tags may not be available as before. |
| 12 | + |
| 13 | +If your pipelines pull Bitnami charts or images during deploys, you may experience significant operational issues: rollouts can fail with `ImagePullBackOff` or auth/404 errors, clusters can drift when staging keeps old cached images while production can't pull or resolves a different tag, and "invisible" upgrades can occur when a moved tag points to a new digest. During incidents, rollbacks may slow down or fail entirely because the old image isn't fetchable. |
| 14 | + |
| 15 | +Beyond deployment issues, compliance can break, security patches can stall behind limits or paywalls, and you may face surprise licensing or mirroring costs. The net effect: slower releases, harder debugging, inconsistent environments, and higher operational and business risk. |
12 | 16 |
|
13 | 17 | To reduce the impact on Valkey deployments, the community created an official, project-maintained Helm chart (request: [issue #2371](https://github.com/valkey-io/valkey/issues/2371), chart: [valkey-helm](https://github.com/valkey-io/valkey-helm)). With the official chart, you can pin chart and image versions, keep `values.yaml` in code, and upgrade on your schedule without depending on vendor policy changes. |
14 | 18 |
|
15 | | -### Why a Valkey maintained chart helps |
| 19 | +## Why a Valkey maintained chart helps |
| 20 | + |
| 21 | +With the official chart, you control exactly which versions you deploy, without third-party vendor policies forcing unexpected changes. Pin a chart release from the Valkey repo (for example `--version 0.9.0` from [https://github.com/valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm)) and lock the Valkey image tag in your `values.yaml`. Because the chart follows Valkey releases and docs, you can bump versions in a pull request, test in staging, then promote the same versions to production. |
| 22 | + |
| 23 | +## Essential capabilities in the Valkey Helm Chart |
| 24 | + |
| 25 | +The official Valkey Helm chart supports the following: |
| 26 | + |
| 27 | +* **Standalone cache** - Deploy a single Valkey instance with or without data persistence, perfect for simple caching layers and development environments. |
| 28 | + |
| 29 | +* **Replicated read-heavy workloads** - Use a primary-replica topology with separate read and read-write endpoints, distributing read traffic across all replica instances while routing writes to the primary node. |
16 | 30 |
|
17 | | -With the official chart, you run what you intend, not what a third party changes. Pin a chart release from the Valkey repo (for example `--version 0.7.7` from [https://github.com/valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm)) and lock the Valkey image tag in your `values.yaml`. Because the chart follows Valkey releases and docs, you can bump versions in a pull request, test in staging, then promote the same versions to production. If something breaks, use Helm history to roll back with `helm rollback <release> <revision>`. Keep your values in source control, often per environment (`values.staging.yaml`, `values.prod.yaml`), and you get a clean GitOps flow. For details and examples, see the [README](https://github.com/valkey-io/valkey-helm#readme). |
| 31 | +* **ACL-based authentication** - Enable authentication using Access Control Lists for fine-grained user permissions and password-based authentication. |
18 | 32 |
|
| 33 | +* **TLS encryption** - Enable TLS for encrypted client-server and replica-primary communication, protecting data in transit. |
19 | 34 |
|
20 | | -### Essential capabilities in the Valkey Helm Chart. |
| 35 | +* **Metrics** - Monitor Valkey instances using the Prometheus exporter sidecar. |
21 | 36 |
|
22 | | -This chart focuses on the basics. It gives you a clean default and a few knobs you actually need. |
| 37 | +## Migrating from Bitnami to the Official Valkey Chart |
23 | 38 |
|
24 | | -* **Small cache for one service.** One Valkey pod, no persistence, ClusterIP service. Fast to start. Good for stateless caches. See the install steps in the [README](https://github.com/valkey-io/valkey-helm#readme). |
25 | | -* **Read-heavy traffic.** One primary with two replicas. Point reads at a separate service if you prefer. Writes still go to the primary. Configure replicas in `values.yaml` and upgrade with Helm. |
26 | | -* **Simple durability.** Turn on PVCs. Pick a storage class your cluster supports. Back up PVCs with your platform’s snapshot tools while chart-level hooks are being designed. |
27 | | -* **Safe deploys.** Pin your chart version and Valkey image tag in `values.yaml`. Use `helm diff` in CI. If probes fail after an upgrade, roll back immediately with Helm. |
| 39 | +Because of differences in how the two charts structure resources, labels, and StatefulSets, you can't upgrade in-place from Bitnami. The charts use incompatible naming conventions and resource management approaches. Instead, deploy the official Valkey chart alongside your existing Bitnami installation and migrate the data. Plan for a brief maintenance window to ensure all writes are fully replicated before switching your applications to the new endpoints. |
28 | 40 |
|
29 | | -## How to migrate from Bitnami to the Valkey Helm chart (in-place). |
| 41 | +### Before You Migrate |
30 | 42 |
|
31 | | -**This path has downtime.** Plan a short **maintenance window** and pause writers during the swap. |
| 43 | +Review the [official chart documentation](https://github.com/valkey-io/valkey-helm/tree/main/valkey) to understand configuration options and match your current Bitnami settings. Bitnami's default configuration deploys one primary with three replicas, protected by a randomly-generated password and without TLS. The migration steps below will configure the official chart the same way — adjust the chart parameters to match your current deployment. |
32 | 44 |
|
33 | | -### 1) Find your release and namespace |
| 45 | +Make sure to use Bitnami's Valkey chart version 2.0.0 or higher as service name and label have changed from `master` to `primary`. |
34 | 46 |
|
| 47 | +The following commands should be executed from a Bash shell. You'll need `kubectl` configured to access your Kubernetes cluster, `helm` to install the new chart, and the standard utilities `grep` and `base64`. |
| 48 | + |
| 49 | +### Step 1: Find existing pods, services and namespace |
| 50 | + |
| 51 | +```shell |
| 52 | +$ kubectl get pods --all-namespaces -l app.kubernetes.io/name=valkey -o custom-columns=Pod:.metadata.name,Namespace:.metadata.namespace,Instance:.metadata.labels.app\\.kubernetes\\.io\\/instance |
| 53 | +Pod Namespace Instance |
| 54 | +valkey-bitnami-primary-0 apps-test valkey-bitnami |
| 55 | +valkey-bitnami-replicas-0 apps-test valkey-bitnami |
| 56 | +valkey-bitnami-replicas-1 apps-test valkey-bitnami |
| 57 | +valkey-bitnami-replicas-2 apps-test valkey-bitnami |
35 | 58 | ``` |
36 | | -helm list --all-namespaces# Example: NAME=valkey-prod NAMESPACE=acme-valkey |
37 | | -kubectl get pods,svc,sts,pvc -n acme-valkey |
38 | 59 |
|
| 60 | +Replace values below with the namespace and instance above: |
| 61 | + |
| 62 | +```bash |
| 63 | +export NAMESPACE="apps-test" |
| 64 | +export INSTANCE="valkey-bitnami" |
39 | 65 | ``` |
40 | 66 |
|
41 | | -### 1) Back up and capture current values |
| 67 | +Identify primary service: |
42 | 68 |
|
| 69 | +```bash |
| 70 | +export SVCPRIMARY=$(kubectl get service -n $NAMESPACE -l app.kubernetes.io/instance=$INSTANCE,app.kubernetes.io/name=valkey,app.kubernetes.io/component=primary -o jsonpath='{.items[0].metadata.name}') |
43 | 71 | ``` |
44 | | -helm get values valkey-prod -n acme-valkey -o yaml > current-values.yaml# Also take an AOF/RDB or storage snapshot |
45 | 72 |
|
| 73 | +If authentication is enabled, fetch the password: |
| 74 | + |
| 75 | +```bash |
| 76 | +export PASS=$(kubectl get secret -n apps-test -l app.kubernetes.io/name=valkey,app.kubernetes.io/instance=valkey-bitnami -o jsonpath='{.items[0].data.valkey-password}' | base64 -d) |
46 | 77 | ``` |
47 | 78 |
|
48 | | -### 2) Add the Valkey-helm repo |
| 79 | +### Step 2: Deploy a new Valkey server |
| 80 | + |
| 81 | +Choose an instance name for the new deployment. It must be different from the current instance to avoid overwriting resources. |
49 | 82 |
|
| 83 | +```bash |
| 84 | +export NEWINSTANCE="valkey" |
50 | 85 | ``` |
| 86 | + |
| 87 | +Add the official Helm chart repository: |
| 88 | + |
| 89 | +```shell |
51 | 90 | helm repo add valkey https://valkey.io/valkey-helm/ |
52 | 91 | helm repo update |
53 | 92 | ``` |
54 | 93 |
|
55 | | -### 3) Prepare migration overrides |
56 | | - |
57 | | -Match names so the new chart **reuses the same PVCs and Services**. Create `migrate-values.yaml`: |
| 94 | +Create a `values.yaml` file that matches your current deployment. The example below is similar to the default Bitnami Valkey configuration: |
58 | 95 |
|
59 | | -``` |
60 | | -# Set to the names your Bitnami release created |
61 | | -nameOverride: "<bitnami-short-name>" # e.g., "valkey" |
62 | | -fullnameOverride: "<bitnami-full-name>" # e.g., "valkey-master" |
63 | | -service: |
64 | | -name: "<existing-service-name>" # e.g., "valkey" |
65 | | -port: 6379 |
66 | | -persistence: |
67 | | -enabled: true |
68 | | -size: "<existing-pvc-size>" # e.g., "8Gi" |
69 | | -storageClass: "<existing-class-or-null>" |
| 96 | +**Note**: The example below provides the password as plain-text for simplicity. In production, store the password in a Kubernetes Secret and reference it using the `auth.usersExistingSecret` setting. |
70 | 97 |
|
71 | | -``` |
| 98 | +```shell |
| 99 | +cat << EOF > values.yaml |
| 100 | +auth: |
| 101 | + enabled: true |
| 102 | + aclUsers: |
| 103 | + default: |
| 104 | + password: "$PASS" |
| 105 | + permissions: "~* &* +@all" |
72 | 106 |
|
73 | | -Tip: confirm with |
| 107 | +replica: |
| 108 | + enabled: true |
| 109 | + replicas: 3 |
| 110 | + persistence: |
| 111 | + size: 8Gi |
74 | 112 |
|
75 | | -``` |
76 | | -kubectl get sts,svc,pvc -n acme-valkey -o wide |
| 113 | +valkeyConfig: | |
| 114 | + appendonly yes |
| 115 | + save "" |
| 116 | +EOF |
77 | 117 | ``` |
78 | 118 |
|
79 | | -### 4) Dry run (recommended) |
| 119 | +Install the new Valkey instance: |
80 | 120 |
|
81 | | -``` |
82 | | -helm upgrade valkey-prod valkey/valkey \ |
83 | | - -n acme-valkey \ |
84 | | - -f current-values.yaml \ |
85 | | - -f migrate-values.yaml \ |
86 | | - --dry-run |
| 121 | +```shell |
| 122 | +helm install -n $NAMESPACE $NEWINSTANCE valkey/valkey -f values.yaml |
87 | 123 | ``` |
88 | 124 |
|
89 | | -### 5) Enter maintenance window (pause writes) |
| 125 | +Check it is running as expected: |
90 | 126 |
|
91 | | -### 6) Perform the in-place swap |
| 127 | +```shell |
| 128 | +$ kubectl get pods -n $NAMESPACE -l app.kubernetes.io/instance=$NEWINSTANCE |
| 129 | +NAME READY STATUS RESTARTS AGE |
| 130 | +valkey-0 1/1 Running 0 2m33s |
| 131 | +valkey-1 1/1 Running 0 2m16s |
| 132 | +valkey-2 1/1 Running 0 2m4s |
| 133 | +valkey-3 1/1 Running 0 103s |
92 | 134 |
|
| 135 | +$ kubectl exec -n $NAMESPACE $NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning ping |
| 136 | +PONG |
93 | 137 | ``` |
94 | | -helm upgrade valkey-prod valkey/valkey \ |
95 | | - -n acme-valkey \ |
96 | | - -f current-values.yaml \ |
97 | | - -f migrate-values.yaml \ |
98 | | - --atomic --wait --timeout 10m |
| 138 | + |
| 139 | +Create a shortcut to call Valkey CLI on the new instance: |
| 140 | + |
| 141 | +```shell |
| 142 | +export NEW_VALKEY_CLI="kubectl exec -n $NAMESPACE $NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning" |
99 | 143 | ``` |
100 | 144 |
|
101 | | -`--atomic` will auto-rollback if health checks fail. |
| 145 | +### Step 3: Enable replication |
102 | 146 |
|
103 | | -### 7) Verify and reopen traffic |
| 147 | +Replicate data from current instance and ensure it is replicating: |
104 | 148 |
|
105 | | -``` |
106 | | -helm status valkey-prod -n acme-valkey |
107 | | -kubectl get pods,svc,sts,pvc -n acme-valkey |
| 149 | +```shell |
| 150 | +$ $NEW_VALKEY_CLI config set primaryauth $PASS |
| 151 | +OK |
| 152 | +$ $NEW_VALKEY_CLI replicaof $SVCPRIMARY 6379 |
| 153 | +OK |
| 154 | +$ $NEW_VALKEY_CLI info | grep '^\(role\|master_host\|master_link_status\)' |
| 155 | +role:slave |
| 156 | +master_host:valkey-bitnami-primary |
| 157 | +master_link_status:up |
108 | 158 | ``` |
109 | 159 |
|
110 | | -### Rollback (if needed) |
| 160 | +### Step 4: Enter maintenance window |
111 | 161 |
|
112 | | -``` |
113 | | -helm history valkey-prod -n acme-valkey |
114 | | -helm rollback valkey-prod <REVISION> -n acme-valkey --wait |
| 162 | +Pause all clients connecting to Valkey. Wait a few seconds to ensure all data is replicated and reconfigure the new instance as primary: |
115 | 163 |
|
| 164 | +```bash |
| 165 | +$ $NEW_VALKEY_CLI replicaof no one |
| 166 | +OK |
| 167 | +$ $NEW_VALKEY_CLI info | grep '^role:' |
| 168 | +role:master |
116 | 169 | ``` |
117 | 170 |
|
118 | | -**Notes** |
| 171 | +### Step 5: Switch clients to new endpoints |
| 172 | + |
| 173 | +Update all clients to use the new Valkey read-write and read-only endpoints which are exposed as services (`SERVICE.NAMESPACE.svc.cluster.local`). In the example above: |
| 174 | + |
| 175 | +* Read-Write (primary): `valkey.apps-test.svc.cluster.local` |
| 176 | +* Read-Only (all instances): `valkey-read.apps-test.svc.cluster.local` |
119 | 177 |
|
120 | | -* PVC reuse depends on matching names; `fullnameOverride` is key. |
121 | | -* Keep ports and Service names the same to avoid app changes. |
122 | | -* Copy auth/TLS settings into the new chart before the swap. |
| 178 | +## What's next for Valkey Helm? |
123 | 179 |
|
124 | | -If you run into issues use the chart repo issues at https://github.com/valkey-io/valkey-helm/issues. |
| 180 | +The chart [milestones](https://github.com/valkey-io/valkey-helm/milestones) outlines the planned improvements for the official Valkey Helm chart, which is being actively developed in the open at the [valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm) repository. |
125 | 181 |
|
126 | | -## Next steps |
| 182 | +* **Sentinel** - Enable high-availability via Sentinel with automated failover |
| 183 | +* **Backups** - Provide paths to schedule snapshots |
127 | 184 |
|
128 | | -The [issue](https://github.com/bitnami/charts/issues/36215) outlines the planned improvements for the official Valkey Helm chart, which is being actively developed in the open at the [valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm) repository. |
| 185 | +## Get started today |
129 | 186 |
|
130 | | -* **Cluster mode.** Make it easy to run primaries and replicas across slots with sane defaults. |
131 | | -* **Security.** Expose TLS, auth, and Secrets cleanly in values, with copy-paste examples. |
132 | | -* **Observability.** Add a metrics toggle (Prometheus exporter and sample dashboards). |
133 | | -* **Backups.** Provide a simple path to schedule snapshots and store them in S3 or GCS. |
134 | | -* **Upgrades.** Publish notes tied to Valkey releases. Add hooks and checks so failures are obvious and quick to revert. |
135 | | -* **Docs.** Keep them short. Add clear examples. Link to deeper guides only when needed. |
| 187 | +If you currently rely on Bitnami, test this chart in a dev cluster and try your normal workflows. The official Valkey Helm chart provides a stable, community-maintained path forward that puts you in control of your deployment lifecycle. |
136 | 188 |
|
137 | | -If you currently rely on Bitnami, test this chart in a dev cluster and try your normal workflows. If something is missing, open an issue at [valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm/issues). Once you try out the official Valkey helm chart please share feedback so the chart grows in the right direction. |
| 189 | +If something is missing or you encounter issues, the Valkey community is here to help. Open an issue at [valkey-io/valkey-helm](https://github.com/valkey-io/valkey-helm/issues) or reach out on the [#valkey-helm](https://valkey-oss-developer.slack.com/archives/C09JZ6N2AAV) Slack channel. Your feedback helps ensure the chart grows in the right direction for the entire community. |
0 commit comments