- Home
- Operations Guide
- Upgrade Guide
- Upgrade Valkey in HA Deployments
Upgrade Valkey in HA Deployments#
This section is intended for MSR administrators who manage the Valkey instance of an MSR deployment with High Availability (HA). It applies to the Valkey instance deployed as described in Install highly available Valkey with replication or Install highly available Valkey with Sentinel.
Upgrade Valkey Without Changing the Chart Version#
-
Verify the Valkey version:
kubectl get pod <valkey-pod> -o jsonpath='{.spec.containers[*].image}' -
Upgrade Valkey without changing the chart version:
helm upgrade msr-valkey oci://registry.mirantis.com/harbor/helm/mirantis-valkey/valkey \ --version <chart-version> \ --reuse-values \ --set image.tag=<new-tag>Set
--versionto the chart version you installed, 0.12.1 or 1.0.0. Without--version, Helm pulls the latest chart. To upgrade from chart 0.12.1 to 1.0.0, see Upgrade the Valkey Helm Chart from 0.12.1 to 1.0.0.
Upgrade the Valkey Helm Chart from 0.12.1 to 1.0.0#
Warning
Do not use --reuse-values for this upgrade.
The upgrade fails because chart 1.0.0 renamed several values.
Pass all values again with the chart 1.0.0 names.
Chart 1.0.0 renames the following values:
| Chart 0.12.1 value | Chart 1.0.0 value |
|---|---|
replica.persistence.size |
persistence.enabled, persistence.size |
replica.replicas=2 (replicas in addition to the primary) |
replica.replicas=3 (total, including the primary) |
valkeyConfig |
extraConfig |
If you installed Valkey with an inline password, using auth.aclUsers.default.password, you can keep that value in chart 1.0.0.
Alternatively, switch to auth.usersExistingSecret and auth.aclUsers.default.passwordKey as in the following command, provided that the REDIS_PASSWORD key of the msr-valkey-secret secret holds the same password.
To upgrade the chart, run:
helm upgrade msr-valkey oci://registry.mirantis.com/harbor/helm/mirantis-valkey/valkey \
--version 1.0.0 \
--set replica.enabled=true \
--set replica.replicas=3 \
--set persistence.enabled=true \
--set persistence.size=10Gi \
--set auth.enabled=true \
--set auth.usersExistingSecret=msr-valkey-secret \
--set auth.aclUsers.default.passwordKey=REDIS_PASSWORD \
--set "auth.aclUsers.default.permissions=~* &* +@all"
The upgrade keeps the existing data volumes and the Valkey password. The MSR 4 configuration does not change.
Upgrade Valkey with Sentinel#
-
Verify the Valkey and Sentinel versions:
kubectl get pod <valkey-pod> -o jsonpath='{.spec.containers[*].image}' kubectl get pod <sentinel-pod> -o jsonpath='{.spec.containers[*].image}' -
Upgrade Valkey:
Note
Set
--versionto the target chart version. Valkey with Sentinel requires Valkey Helm chart 1.0.0 or later. Chart 0.12.1 does not support Sentinel. Without--version, Helm pulls the latest chart.helm upgrade msr-valkey oci://registry.mirantis.com/harbor/helm/mirantis-valkey/valkey \ --version <chart-version> \ --set replica.enabled=true \ --set replica.replicas=3 \ --set persistence.enabled=true \ --set persistence.size=10Gi \ --set auth.enabled=true \ --set auth.usersExistingSecret=msr-valkey-secret \ --set auth.aclUsers.default.passwordKey=REDIS_PASSWORD \ --set "auth.aclUsers.default.permissions=~* &* +@all" \ --set sentinel.enabled=true \ --set sentinel.replicas=3 \ --set sentinel.auth.enabled=false \ --set networkPolicy.enabled=true \ --set "networkPolicy.ingressNSMatchLabels.kubernetes\.io/metadata\.name=<msr-namespace>"