You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Silvio Gissi is a Technical Account Manager at AWS and open-source enthusiast who serves as one of the maintainers of the Valkey Helm chart. His work helps teams deploy Valkey in Kubernetes environments. When he's not contributing to open source, Silvio enjoys playing guitar.
Copy file name to clipboardExpand all lines: content/blog/2025-11-05-valkey-helm-chart/index.md
+38-22Lines changed: 38 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The official Valkey Helm chart supports the following:
32
32
33
33
***TLS encryption** - Enable TLS for encrypted client-server and replica-primary communication, protecting data in transit.
34
34
35
-
***Metrics** - Monitor Valkey instances using the Prometheus exporter sidecar.
35
+
***Metrics** - Collect Valkey metrics by enabling the Prometheus exporter.
36
36
37
37
## Migrating from Bitnami to the Official Valkey Chart
38
38
@@ -42,14 +42,16 @@ Because of differences in how the two charts structure resources, labels, and St
42
42
43
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.
44
44
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`.
45
+
Ensure you are using Bitnami Valkey chart version 2.0.0 or higher. That release updated service names and labels from `master` to `primary` for consistency with current terminology, and the migration steps below assumes that naming convention.
46
46
47
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
48
49
49
### Step 1: Find existing pods, services and namespace
50
50
51
51
```shell
52
+
# List all pods in all namespaces with app name 'valkey'
52
53
$ 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
Save current environment details to be used for replication:
68
70
69
71
```bash
72
+
# Identify the name of the current primary service
70
73
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}')
alias new-valkey-cli="kubectl exec -n $NAMESPACE$NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning"
143
147
```
144
148
145
149
### Step 3: Enable replication
146
150
147
151
Replicate data from current instance and ensure it is replicating:
148
152
149
153
```shell
150
-
$ $NEW_VALKEY_CLI config set primaryauth $PASS
154
+
# Configure password to connect to existing Valkey instance
155
+
$ new-valkey-cli config set primaryauth $PASS
156
+
# * Sample Output *
151
157
OK
152
-
$ $NEW_VALKEY_CLI replicaof $SVCPRIMARY 6379
158
+
159
+
# Configure new instance to replicate data from the current instance
160
+
$ new-valkey-cli replicaof $SVCPRIMARY 6379
161
+
# * Sample Output *
153
162
OK
154
-
$ $NEW_VALKEY_CLI info | grep '^\(role\|master_host\|master_link_status\)'
163
+
164
+
# Check status of replication, it should return a 'slave' role and master_link_status as 'up'
165
+
$ new-valkey-cli info | grep '^\(role\|master_host\|master_link_status\)'
166
+
# * Sample Output *
155
167
role:slave
156
168
master_host:valkey-bitnami-primary
157
169
master_link_status:up
158
170
```
159
171
160
172
### Step 4: Enter maintenance window
161
173
162
-
Pause all clients connecting to Valkey. Wait a few seconds to ensure all data is replicated and reconfigure the new instance as primary:
174
+
Pause all clients connecting to the Valkey server deployed using Bitnami's chart. Wait a few seconds to ensure all data is replicated and reconfigure the new instance back to primary:
163
175
164
176
```bash
165
-
$ $NEW_VALKEY_CLI replicaof no one
177
+
# Stops replication with old Valkey instance and become primary
178
+
$ new-valkey-cli replicaof no one
179
+
# * Sample Output *
166
180
OK
167
-
$ $NEW_VALKEY_CLI info | grep '^role:'
181
+
182
+
# Check that instance role is 'master'
183
+
$ new-valkey-cli info | grep '^role:'
184
+
# * Sample Output *
168
185
role:master
169
186
```
170
187
171
188
### Step 5: Switch clients to new endpoints
172
189
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:
190
+
Update all clients to use the new Valkey read-write and read-only endpoints which are exposed as services. To list the service endpoints:
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.
181
-
182
-
***Sentinel** - Enable high-availability via Sentinel with automated failover
183
-
***Backups** - Provide paths to schedule snapshots
199
+
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. High-availability via Sentinel for automated failover is the next upcoming feature [#22](https://github.com/valkey-io/valkey-helm/issues/22), followed by Cluster support [#18](https://github.com/valkey-io/valkey-helm/issues/18).
0 commit comments