Skip to content

Migrate from Redis to Valkey with Sentinel#

This procedure switches the MSR 4 cache from Redis to Valkey with Sentinel. It applies whether or not your current Redis deployment uses Sentinel.

Before You Begin#

Complete the steps in Install highly available Valkey with Sentinel. Expected behavior during migration and backup considerations are the same as in Migrate from Redis to Valkey.

Switch MSR 4 to Valkey with Sentinel#

  1. Modify the values.yaml configuration file:

    redis:
        type: external
        external:
            addr: "msr-valkey-sentinel-0.msr-valkey-sentinel-hl.default.svc.cluster.local:26379,msr-valkey-sentinel-1.msr-valkey-sentinel-hl.default.svc.cluster.local:26379,msr-valkey-sentinel-2.msr-valkey-sentinel-hl.default.svc.cluster.local:26379"
            existingSecret: msr-valkey-secret
            sentinelMasterSet: "mymaster"
    

    In the Valkey Sentinel addresses, replace default with your MSR 4 namespace. If you migrate from Redis with Sentinel, replace the msr-redis-s-* addresses with the Valkey Sentinel addresses above, and msr-redis-secret with msr-valkey-secret.

  2. Upgrade MSR 4:

    helm upgrade <release-name> oci://registry.mirantis.com/harbor/helm/msr \
      --version <msr-version> \
      -f values.yaml
    
  3. Verify the replication with Valkey on the primary that Sentinel reports:

    kubectl exec msr-valkey-sentinel-0 -- valkey-cli -p 26379 SENTINEL get-master-addr-by-name mymaster
    kubectl exec -it <primary-pod> -c valkey -- valkey-cli -a $PASSWORD INFO replication
    

    The primary reports role:master and connected_slaves:2.

  4. Remove Redis.