{
  "id": "openshift-cli",
  "title": "Upgrade Redis Enterprise with OpenShift CLI",
  "url": "https://redis.io/docs/latest/operate/kubernetes/7.8.4/upgrade/openshift-cli/",
  "summary": "This task describes how to upgrade a Redis Enterprise cluster via OpenShift CLI.",
  "content": "\nRedis implements rolling updates for software upgrades in Kubernetes deployments. The upgrade process includes updating three components:\n\n  1. [Upgrade the Redis Enterprise operator](#upgrade-the-operator)\n  1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster)\n  1. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases)\n\n## Prerequisites\n\nThe following steps ensure you have the minimum versions of all components necessary to upgrade to 7.8.2-6 or later. **Without these minimum versions, the upgrade will freeze and require manual recovery.**\n\nSee the [troubleshooting](#troubleshooting) section for details on recovering a failed upgrade.\n\n#### Kubernetes version\n\nCheck [Supported Kubernetes distributions]() to make sure your Kubernetes distribution is supported. If not, upgrade your Kubernetes distribution before upgrading the Redis operator.\n\n#### Redis operator version\n\nYour Redis Enterprise clusters must be running version 7.4.2-2 or later before upgrading to 7.8.2-6 or later. See the [7.4 upgrade](https://redis.io/docs/latest/operate/kubernetes/7.4.6/upgrade/openshift-cli/) for detailed steps.\n\n#### Redis database version\n\nYour Redis databases must be running version 7.2 or later before upgrading your cluster version. See [upgrade databases](#upgrade-databases) for detailed steps. You can find your database version in the [REDB `spec.redisVersion` field]().\n\n#### RHEL9-compatible modules\n\nUpgrading to Redis operator versions 7.8.2-6 and later  involves migrating your Redis Enterprise nodes to RHEL9 from either Ubuntu 18 or RHEL8. If your databases use modules, you need to manually install modules compatible with RHEL9.\n\nTo see which modules you have installed, run:\n\n```sh\ncurl -k -u \u003crec_username\u003e:\u003crec_password\u003e -X GET https://localhost:9443/v1/modules | jq -r 'map([.module_name, .semantic_version, (.platforms | keys)]) | .[] | .[0] as $name | .[1] as $version | .[2][] | $name + \"-\" + $version + \"-\" + .' | sort\n```\n\nTo see which modules are currently in use, run:\n\n```sh\ncurl -k -u \u003crec_username\u003e:\u003crec_password\u003e -X GET https://localhost:9443/v1/bdbs | jq -r '.[].module_list | map(.module_name + \"-\" + .semantic_version) | .[]'\n```\n\nSee [Upgrade modules]() for details on how to upgrade modules with the `rladmin` tool.\n\n#### Valid license\n\nUse `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.\n\n## Upgrade the operator\n\n### Download the bundle\n\nMake sure you pull the correct version of the bundle. You can find the version tags\nby checking the [operator releases on GitHub](https://github.com/RedisLabs/redis-enterprise-k8s-docs/releases)\nor by [using the GitHub API](https://docs.github.com/en/rest/reference/repos#releases).\n\nFor OpenShift environments, the name of the bundle is `openshift.bundle.yaml`, and so the `curl` command to run is:\n\n```sh\ncurl --silent -O https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/$VERSION/openshift.bundle.yaml\n```\n\nIf you need a different release, replace `VERSION` in the above with a specific release tag.\n\n### Apply the bundle\n\nApply the bundle to deploy the new operator binary. This will also apply any changes in the new release to custom resource definitions, roles, role binding, or operator service accounts.\n\n\nIf you are not pulling images from Docker Hub, update the operator image spec to point to your private repository.\nIf you have made changes to the role, role binding, RBAC, or custom resource definition (CRD) in the previous version, merge them with the updated declarations in the new version files.\n\n\nIf you are using OpenShift, run this instead:\n\n```sh\noc apply -f openshift.bundle.yaml\n```\n\nAfter running this command, you should see a result similar to this:\n\n```sh\nrole.rbac.authorization.k8s.io/redis-enterprise-operator configured\nserviceaccount/redis-enterprise-operator configured\nrolebinding.rbac.authorization.k8s.io/redis-enterprise-operator configured\ncustomresourcedefinition.apiextensions.k8s.io/redisenterpriseclusters.app.redislabs.com configured\ncustomresourcedefinition.apiextensions.k8s.io/redisenterprisedatabases.app.redislabs.com configured\ndeployment.apps/redis-enterprise-operator configured\n```\n\n### Reapply the admission controller webhook {#reapply-webhook}\n\nIf you have the admission controller enabled, you need to manually reapply the `ValidatingWebhookConfiguration`.\n\n\n\n\n\n\n\n### Verify the operator is running\n\nYou can check your deployment to verify the operator is running in your namespace.\n\n```sh\noc get deployment/redis-enterprise-operator\n```\n\nYou should see a result similar to this:\n\n```sh\nNAME                        READY   UP-TO-DATE   AVAILABLE   AGE\nredis-enterprise-operator   1/1     1            1           0m36s\n```\n\n\n We recommend upgrading the REC as soon as possible after updating the operator. After the operator upgrade completes, the operator suspends the management of the REC and its associated REDBs, until the REC upgrade completes.\n \n\n### Reapply the SCC\n\nIf you are using OpenShift, you will also need to manually reapply the [security context constraints](https://docs.openshift.com/container-platform/4.8/authentication/managing-security-context-constraints.html) file ([`scc.yaml`]()) and bind it to your service account.\n\n```sh\noc apply -f openshift/scc.yaml\n```\n\n```sh\noc adm policy add-scc-to-user redis-enterprise-scc-v2 \\\n  system:serviceaccount:\u003cmy-project\u003e:\u003crec-name\u003e\n```\n\nIf you are upgrading from operator version 6.4.2-6 or before, see the [\"after upgrading\"](#after-upgrading) section to delete the old SCC and role binding after all clusters are running 6.4.2-6 or later.\n\n## Upgrade the Redis Enterprise Cluster \n\n\nVerify your license is valid before upgrading. Invalid licenses will cause the upgrade to fail.\n\nUse `oc get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.\n\n\nThe Redis Enterprise cluster (REC) can be updated automatically or manually. To trigger automatic upgrade of the REC after the operator upgrade completes, specify `autoUpgradeRedisEnterprise: true` in your REC spec. If you don't have automatic upgrade enabled, follow the below steps for the manual upgrade.\n\nBefore beginning the upgrade of the Redis Enterprise cluster, check the K8s operator [release notes]() to find the Redis Enterprise image tag.\n\nAfter the operator upgrade is complete, you can upgrade Redis Enterprise cluster (REC).\n\n### Edit `redisEnterpriseImageSpec`\n\n1. Edit the REC custom resource YAML file.\n\n    ```sh\n    oc edit rec \u003cyour-rec.yaml\u003e\n    ```\n\n1. Replace the `versionTag:` declaration under `redisEnterpriseImageSpec` with the new version tag.\n\n    ```YAML\n    spec:\n      redisEnterpriseImageSpec:\n        imagePullPolicy:  IfNotPresent\n        repository:       redislabs/redis\n        versionTag:       \u003cnew-version-tag\u003e\n    ```\n\n1. Save the changes to apply.\n\n### Reapply roles and role bindings\n\nIf your operator is monitoring multiple namespaces, you'll need to [reapply your role and role bindings]() for each managed namespace. See [Manage databases in multiple namespaces]() for more details.\n\n### Monitor the upgrade\n\nYou can view the state of the REC with `oc get rec`.\n\n  During the upgrade, the state should be `Upgrade`.\n  When the upgrade is complete and the cluster is ready to use, the state will change to `Running`.\n  If the state is `InvalidUpgrade`, there is an error (usually relating to configuration) in the upgrade.\n\n```sh\n$ oc get rec\nNAME   NODES   VERSION      STATE     SPEC STATUS   LICENSE STATE   SHARDS LIMIT   LICENSE EXPIRATION DATE   AGE\nrec    3       6.2.10-107   Upgrade   Valid         Valid           4              2022-07-16T13:59:00Z      92m\n```\n\nTo see the status of the current rolling upgrade, run:\n\n```sh\noc rollout status sts \u003cREC_name\u003e\n```\n\n### Upgrade databases\n\nAfter the cluster is upgraded, you can upgrade your databases. Specify your new database version in the `spec.redisVersion` field for your REDB and REAADB custom resources. Supported database versions include `\"7.2\"` and `\"7.4\"` (note this value is a string).\n\nNote that if your cluster [`redisUpgradePolicy`]() or your database [`redisVersion`]() are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]() for more details.\n\n## Troubleshooting\n\nIf you start an upgrade without meeting the [prerequisites](#prerequisites), the operator will freeze the upgrade. Check the operator logs for the source of the error. The REDB reconsilliation doesn't work during an upgrade, so you need to apply a manual fix with the Redis Software API (examples below). The updates will also need to be added to the REDB custom resource.\n\n### Invalid module version\n\nIf the operator logs show an event related to an unsupported module, download the updated module locally, and install it using the `v2/modules` API endpoint.\n\n```sh\ncurl -sfk -u \u003crec_username\u003e:\u003crec_password\u003e -X POST -F 'module=@\u003cfull path to your module\u003e' https://localhost:9443/v2/modules\n```\n\nAfter updating the modules with the Redis Software API, update the REDB custom resource to reflect the change.\n\n### Invalid database version\n\nIf the operator logs show an event related to an incompatible database version, upgrade the database using the Redis Software API.\n\n```sh\ncurl -sfk -u \u003crec_username\u003e:\u003crec_password\u003e -X POST -H \"Content-Type: application/json\" -d '{\"redis_version\": \u003ctarget redis version\u003e}' https://localhost:9443/v1/bdbs/\u003cBDB UID\u003e/upgrade\n```\n\nAfter updating the database with the Redis Software API, update the REDB custom resource to reflect the change.\n\n\n",
  "tags": ["docs","operate","kubernetes"],
  "last_updated": "2026-04-08T12:21:52-07:00"
}

