- Home
- Installation Guide
- Install MSR with High Availability
- Install Highly Available Cache
- Install Highly Available Valkey (preferred)
- Install highly available Valkey with replication
Install highly available Valkey with replication#
Note
Replication is supported with Valkey Helm chart 0.12.1 and 1.0.0. The chart 1.0.0 values differ from the 0.12.1 values, so use the instructions for the chart version you install.
-
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 \ --version 0.12.1 \ --set replica.enabled=true \ --set replica.replicas=2 \ --set replica.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"Configuration considerations:
- 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. - The
auth.usersExistingSecretandauth.aclUsers.default.passwordKeyvalues specify the secret and the key that store the Valkey password. These are themsr-valkey-secretsecret and theREDIS_PASSWORDkey that you created in step 2. - The
replica.persistence.sizevalue specifies the size of the persistent volume. Adjust it based on your expected data volume and retention requirements.
helm install 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"Configuration considerations:
- The
replica.replicasvalue specifies the total number of Valkey nodes, including the primary node. For example, a value of3deploys one primary node and two replica nodes. - The
auth.usersExistingSecretandauth.aclUsers.default.passwordKeyvalues specify the secret and the key that store the Valkey password. These are themsr-valkey-secretsecret and theREDIS_PASSWORDkey that you created in step 2. - The
persistence.sizevalue specifies the size of the persistent volume. Adjust it 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}
See also