Skip to content

Commit dd84415

Browse files
committed
Update based on feedback
Signed-off-by: Silvio Gissi <silvio@gissilabs.com>
1 parent 52735ed commit dd84415

File tree

3 files changed

+46
-22
lines changed

3 files changed

+46
-22
lines changed

content/authors/sgissi.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Silvio Gissi
3+
extra:
4+
photo: '/assets/media/authors/sgissi.jpg'
5+
github: sgissi
6+
---
7+
8+
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.

content/blog/2025-11-05-valkey-helm-chart/index.md

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The official Valkey Helm chart supports the following:
3232

3333
* **TLS encryption** - Enable TLS for encrypted client-server and replica-primary communication, protecting data in transit.
3434

35-
* **Metrics** - Monitor Valkey instances using the Prometheus exporter sidecar.
35+
* **Metrics** - Collect Valkey metrics by enabling the Prometheus exporter.
3636

3737
## Migrating from Bitnami to the Official Valkey Chart
3838

@@ -42,14 +42,16 @@ Because of differences in how the two charts structure resources, labels, and St
4242

4343
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.
4444

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.
4646

4747
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`.
4848

4949
### Step 1: Find existing pods, services and namespace
5050

5151
```shell
52+
# List all pods in all namespaces with app name 'valkey'
5253
$ 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
54+
# * Sample Output *
5355
Pod Namespace Instance
5456
valkey-bitnami-primary-0 apps-test valkey-bitnami
5557
valkey-bitnami-replicas-0 apps-test valkey-bitnami
@@ -64,15 +66,13 @@ export NAMESPACE="apps-test"
6466
export INSTANCE="valkey-bitnami"
6567
```
6668

67-
Identify primary service:
69+
Save current environment details to be used for replication:
6870

6971
```bash
72+
# Identify the name of the current primary service
7073
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}')
71-
```
72-
73-
If authentication is enabled, fetch the password:
7474

75-
```bash
75+
# Fetch the default user password
7676
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)
7777
```
7878

@@ -125,62 +125,78 @@ helm install -n $NAMESPACE $NEWINSTANCE valkey/valkey -f values.yaml
125125
Check it is running as expected:
126126

127127
```shell
128+
# List new pods and ensure they are in 'Running' state
128129
$ kubectl get pods -n $NAMESPACE -l app.kubernetes.io/instance=$NEWINSTANCE
130+
# * Sample Output *
129131
NAME READY STATUS RESTARTS AGE
130132
valkey-0 1/1 Running 0 2m33s
131133
valkey-1 1/1 Running 0 2m16s
132134
valkey-2 1/1 Running 0 2m4s
133135
valkey-3 1/1 Running 0 103s
134136

137+
# Check that server is responding to CLI commands
135138
$ kubectl exec -n $NAMESPACE $NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning ping
139+
# * Sample Output *
136140
PONG
137141
```
138142

139-
Create a shortcut to call Valkey CLI on the new instance:
143+
Create a shell alias to call the Valkey CLI on the new instance:
140144

141145
```shell
142-
export NEW_VALKEY_CLI="kubectl exec -n $NAMESPACE $NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning"
146+
alias new-valkey-cli="kubectl exec -n $NAMESPACE $NEWINSTANCE-0 -c valkey -- valkey-cli -a $PASS --no-auth-warning"
143147
```
144148

145149
### Step 3: Enable replication
146150

147151
Replicate data from current instance and ensure it is replicating:
148152

149153
```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 *
151157
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 *
153162
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 *
155167
role:slave
156168
master_host:valkey-bitnami-primary
157169
master_link_status:up
158170
```
159171

160172
### Step 4: Enter maintenance window
161173

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:
163175

164176
```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 *
166180
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 *
168185
role:master
169186
```
170187

171188
### Step 5: Switch clients to new endpoints
172189

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:
174191

175-
* Read-Write (primary): `valkey.apps-test.svc.cluster.local`
176-
* Read-Only (all instances): `valkey-read.apps-test.svc.cluster.local`
192+
```shell
193+
echo "Read-Write (primary): $NEWINSTANCE.$NAMESPACE.svc.cluster.local"
194+
echo "Read-only (all instances): $NEWINSTANCE-read.$NAMESPACE.svc.cluster.local"
195+
```
177196

178197
## What's next for Valkey Helm?
179198

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.
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).
184200

185201
## Get started today
186202

263 KB
Loading

0 commit comments

Comments
 (0)