-
Notifications
You must be signed in to change notification settings - Fork 284
K8s: upgrade article fixes #1182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| Title: Upgrade Redis Enterprise 7.8.2-6 with OpenShift OperatorHub | ||
| Title: Upgrade Redis Enterprise with OpenShift OperatorHub | ||
| alwaysopen: false | ||
| categories: | ||
| - docs | ||
|
|
@@ -13,31 +13,31 @@ weight: 40 | |
|
|
||
| Redis implements rolling updates for software upgrades in Kubernetes deployments. The upgrade process includes updating three components: | ||
|
|
||
| 1. [Upgrade the Redis Enterprise operator](#upgrade-the-operator) | ||
| 1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster-rec) | ||
| 1. [Upgrade the Redis Enterprise operator](#upgrade-the-redis-enterprise-operator) | ||
| 1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster) | ||
| 1. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases) | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| The following steps ensure you have the minimum versions of all components necessary to upgrade to 7.8.2-6. **Without these minimum versions, the upgrade will freeze and require manual recovery.** | ||
| The following steps ensure you have the minimum versions of all components necessary to upgrade. **Without these minimum versions, the upgrade will freeze and require manual recovery.** | ||
|
|
||
| See the [troubleshooting](#troubleshooting) section for details on recovering a failed upgrade. | ||
|
|
||
| ### Kubernetes version | ||
| #### Kubernetes version | ||
|
|
||
| Check [Supported Kubernetes distributions]({{<relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported by 7.8.2-6. If not, upgrade your Kubernetes distribution before upgrading the Redis operator. | ||
| Check [Supported Kubernetes distributions]({{<relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported. If not, upgrade your Kubernetes distribution before upgrading the Redis operator. | ||
|
|
||
| ### Redis operator version | ||
| #### Redis operator version | ||
|
|
||
| Your Redis Enterprise clusters must be running version 7.4.2-2 or later before upgrading to 7.8.2-6. See the [7.4 upgrade](https://redis.io/docs/latest/operate/kubernetes/7.4.6/upgrade/upgrade-olm/) for detailed steps. | ||
|
|
||
| ### Redis database version | ||
| #### Redis database version | ||
|
|
||
| Your Redis databases must be running version 7.2 or later before upgrading your cluster version to 7.8.2-6. See [upgrade databases](#upgrade-databases) for detailed steps. You can find your database version in the [REDB `spec.redisVersion` field]({{<relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}). | ||
|
|
||
| ### RHEL9-compatible modules | ||
| #### RHEL9-compatible modules | ||
|
|
||
| Upgrading to Redis operator version 7.8.2-6 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 compatibile with RHEL9. | ||
| Upgrading to Redis operator version 7.8.2-6 or 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. | ||
|
|
||
| To see which modules you have installed, run: | ||
|
|
||
|
|
@@ -65,17 +65,18 @@ Use `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before | |
|
|
||
| 3. Verify your **Update approval** is set to "Manual". | ||
|
|
||
| 4. If you wish to upgrade to the most recent version, set your **Update channel** to "production". If you wish to upgrade to an older version, select it for your Update channel. | ||
| 4. To upgrade to the latest version, set your **Update Channel** to ‘production’. To upgrade to an older version, specify the desired version for your **Update Channel**. | ||
|
|
||
| 5. Select **Upgrade available** shown under **Upgrade status**. | ||
|
|
||
| 6. When the "Review manual InstallPlan" section appears, select **Preview installPlan** and then **Approve** after reviewing the details. This will start the operator upgrade. | ||
|
|
||
| You can monitor the upgrade from the **Installed Operators** page. A new Redis Enterprise Operator will appear in the list, with the status "Installing". The OpenShift will delete the old operator, showing the "Cannot update" status during deletion. | ||
| You can monitor the upgrade from the **Installed Operators** page. A new Redis Enterprise Operator will appear in the list, with the status "Installing". OpenShift will delete the old operator, showing the "Cannot update" status during deletion. | ||
|
|
||
| ## Reapply the SCC | ||
|
|
||
| If 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`]({{< relref "/operate/kubernetes/deployment/openshift/openshift-cli#deploy-the-operator" >}})) and bind it to your service account. | ||
|
|
||
| If you are using OpenShift, you must manually reappply the [security context constraints (SCC)](https://docs.openshift.com/container-platform/4.8/authentication/managing-security-context-constraints.html) file ([`scc.yaml`]({{< relref "/operate/kubernetes/deployment/openshift/openshift-cli#deploy-the-operator" >}})) and bind it to your service account. | ||
|
|
||
| ```sh | ||
| oc apply -f openshift/scc.yaml | ||
|
|
@@ -85,12 +86,70 @@ oc apply -f openshift/scc.yaml | |
| oc adm policy add-scc-to-user redis-enterprise-scc-v2 \ | ||
| system:serviceaccount:<my-project>:<rec-name> | ||
| ``` | ||
| ## Upgrade the Redis Enterprise Cluster | ||
|
|
||
| {{<warning>}} | ||
| Verify your license is valid before upgrading. Invalid licenses will cause the upgrade to fail. | ||
|
|
||
| Use `oc get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process. | ||
| {{</warning>}} | ||
|
|
||
| The 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. | ||
|
|
||
| Before beginning the upgrade of the Redis Enterprise cluster, check the K8s operator [release notes]({{<relref "/operate/kubernetes/release-notes">}}) to find the Redis Enterprise image tag. | ||
|
|
||
| After the operator upgrade is complete, you can upgrade Redis Enterprise cluster (REC). | ||
|
|
||
| ### Edit `redisEnterpriseImageSpec` | ||
|
|
||
| 1. Edit the REC custom resource YAML file. | ||
|
|
||
| ```sh | ||
| oc edit rec <your-rec.yaml> | ||
| ``` | ||
|
|
||
| 1. Replace the `versionTag:` declaration under `redisEnterpriseImageSpec` with the new version tag. | ||
|
|
||
| ```YAML | ||
| spec: | ||
| redisEnterpriseImageSpec: | ||
| imagePullPolicy: IfNotPresent | ||
| repository: redislabs/redis | ||
| versionTag: <new-version-tag> | ||
| ``` | ||
|
|
||
| 1. Save the changes to apply. | ||
|
|
||
| ### Reapply roles and role bindings | ||
|
|
||
| If your operator is monitoring multiple namespaces, you'll need to [reapply your role and role bindings]({{< relref "/operate/kubernetes/re-clusters/multi-namespace#create-role-and-role-binding-for-managed-namespaces" >}}) for each managed namespace. See [Manage databases in multiple namespaces]({{< relref "/operate/kubernetes/re-clusters/multi-namespace" >}}) for more details. | ||
|
|
||
| ### Monitor the upgrade | ||
|
|
||
| You can view the state of the REC with `oc get rec`. | ||
|
|
||
| During the upgrade, the state should be `Upgrade`. | ||
| When the upgrade is complete and the cluster is ready to use, the state will change to `Running`. | ||
| If the state is `InvalidUpgrade`, there is an error (usually relating to configuration) in the upgrade. | ||
|
|
||
| ```sh | ||
| $ oc get rec | ||
| NAME NODES VERSION STATE SPEC STATUS LICENSE STATE SHARDS LIMIT LICENSE EXPIRATION DATE AGE | ||
| rec 3 6.2.10-107 Upgrade Valid Valid 4 2022-07-16T13:59:00Z 92m | ||
| ``` | ||
|
|
||
| To see the status of the current rolling upgrade, run: | ||
|
|
||
| ```sh | ||
| oc rollout status sts <REC_name> | ||
| ``` | ||
|
|
||
| ### Upgrade databases | ||
| ## Upgrade databases | ||
|
|
||
| After 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 for operator version 7.8.2-6 include `"7.2"` and `"7.4"` (note this value is a string). | ||
| After 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 for this operator version include `"7.2"` and `"7.4"` (note this value is a string). | ||
|
|
||
| Note that if your cluster [`redisUpgradePolicy`]({{<relref "/operate/kubernetes/reference/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}) are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]({{< relref "/operate/rs/installing-upgrading/upgrading#redis-upgrade-policy" >}}) for more details. | ||
| The 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this should be removed? Already mentioned under the |
||
|
|
||
| ## Troubleshooting | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to remove this also in
upgrade/upgrade-redis-cluster.md.