Install highly available Valkey with replication New#
-
Generate a strong password to authenticate MSR 4 with Valkey:
PASSWORD=$(LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | head -c 24) -
Create a Kubernetes secret to securely store the password:
kubectl create secret generic msr-valkey-secret \ --from-literal=REDIS_PASSWORD=${PASSWORD}Note
MSR 4 requires
REDIS_PASSWORDas the password field name. -
Deploy the Valkey instance:
helm install msr-valkey oci://registry.mirantis.com/harbor/helm/mirantis-valkey/valkey \ --set replica.enabled=true \ --set replica.replicas=2 \ --set auth.existingSecret=msr-valkey-secret \ --set auth.existingSecretKey=REDIS_PASSWORD \ --set replica.persistence.enabled=true \ --set replica.persistence.size=10Gi \ --set auth.enabled=true \ --set "auth.aclUsers.default.password=${PASSWORD}" \ --set "auth.aclUsers.default.permissions=~* &* +@all"Note
- The
replica.replicasvalue specifies the number of replica nodes in addition to the primary node. For example, a value of2deploys one primary node and two replica nodes. - Adjust the
replica.persistence.sizevalue based on your expected data volume and retention requirements.
- The
-
Retrieve the Valkey service port number:
kubectl get svc msr-valkey -o jsonpath={.spec.ports..port}
Upgrade the highly available Valkey#
-
Verify the Valkey version:
kubectl get pod <Valkey Pod> -o jsonpath='{.spec.containers[*].image}' -
Upgrade Valkey:
helm upgrade msr-valkey oci://registry.mirantis.com/harbor/helm/mirantis-valkey/valkey \ --reuse-values \ --set image.tag=<new tag>