Skip to content

Commit 6ebdbf5

Browse files
K8s: User-defined modules (Asgard release) (#2524)
* page improvements * upgrade prereqs * upgrade changes * upgrade notes * Update content/operate/kubernetes/upgrade/openshift-cli.md Co-authored-by: David Dougherty <david.dougherty@redis.com> * Update content/operate/kubernetes/upgrade/upgrade-olm.md Co-authored-by: David Dougherty <david.dougherty@redis.com> * fix links * install and modules page updates * rolling pod restart note * helm upgrade note * cluster recovery * upgrade troubleshooting * AA and flash limitations * links * add troubleshooting * copy edits * review feedback changes --------- Co-authored-by: David Dougherty <david.dougherty@redis.com>
1 parent 5574c80 commit 6ebdbf5

File tree

7 files changed

+433
-87
lines changed

7 files changed

+433
-87
lines changed

content/operate/kubernetes/deployment/helm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ The upgrade process automatically updates the operator and its components, inclu
149149

150150
After you upgrade the operator, you might need to upgrade your Redis Enterprise clusters, depending on the Redis software version bundled with the operator. For detailed information about the upgrade process, see [Redis Enterprise for Kubernetes upgrade documentation](https://redis.io/docs/latest/operate/kubernetes/upgrade/).
151151

152+
{{< note >}}
153+
If your databases use user-defined modules (custom non-bundled modules), you must take additional steps during the upgrade process. See [Upgrade with user-defined modules]({{< relref "/operate/kubernetes/upgrade/upgrade-redis-cluster#user-defined-modules" >}}) for details.
154+
{{< /note >}}
155+
152156
For more information and options when upgrading charts, see [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/).
153157

154158
## Uninstall

content/operate/kubernetes/deployment/quick-start.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ The operator bundle includes a webhook file. The webhook will intercept requests
263263
Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu']
264264
```
265265
266+
## Add user-defined modules (optional)
267+
268+
If you plan to create databases that use user-defined modules (custom non-bundled modules), you must add them to the REC custom resource before creating the databases.
269+
270+
See [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}) for detailed instructions on adding and configuring custom modules.
271+
266272
## Create a Redis Enterprise Database (REDB)
267273
268274
You can create multiple databases within the same namespace as your REC or in other namespaces.

content/operate/kubernetes/re-clusters/cluster-recovery.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ The Redis Enterprise for Kubernetes automates these recovery steps:
2424

2525
{{<warning>}}Redis Enterprise for Kubernetes 7.2.4-2 introduces a new limitation. You cannot recover or upgrade your cluster if there are databases with old module versions or manually uploaded modules. See the [Redis Enterprise Software 7.2.4 known limitations]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases/rs-7-2-4-52#cluster-recovery-with-manually-uploaded-modules" >}}) for more details.{{</warning>}}
2626

27+
{{< note >}}
28+
If your cluster uses user-defined modules, the recovery process doesn't block on module validation errors (such as URL or credential issues). The cluster can recover successfully, and you can resolve any module configuration issues after recovery is complete. See [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}) for more information.
29+
{{< /note >}}
30+
2731
## Prerequisites
2832

2933
- For cluster recovery, the cluster must be [deployed with persistence]({{< relref "/operate/kubernetes/recommendations/persistent-volumes" >}}).

content/operate/kubernetes/re-databases/modules.md

Lines changed: 298 additions & 50 deletions
Large diffs are not rendered by default.

content/operate/kubernetes/upgrade/openshift-cli.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ Your Redis Enterprise clusters must be running version 7.4.2-2 or later before u
3535

3636
Your 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]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_database_api#redisversion" >}}).
3737

38+
#### User-defined modules
39+
40+
If your databases use user-defined modules (custom non-bundled modules):
41+
42+
- Set `autoUpgradeRedisEnterprise: false` in the REC custom resource before upgrading the operator.
43+
- Define the user-defined modules in the REC custom resource before upgrading the database.
44+
- See [Edit `redisEnterpriseImageSpec`](#edit-redisenterpriseimagespec) for more details.
45+
46+
For more information about user-defined modules, see [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}).
47+
3848
#### RHEL9-compatible modules
3949

4050
Upgrading 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.
@@ -81,6 +91,8 @@ For detailed Helm upgrade instructions, see [Upgrade the chart]({{<relref "/oper
8191

8292
## Upgrade the operator
8393

94+
{{<warning>}}If your databases use user-defined modules, set `autoUpgradeRedisEnterprise: false` in the REC custom resource before upgrading the operator.{{</warning>}}
95+
8496
### Download the bundle
8597

8698
Make sure you pull the correct version of the bundle. You can find the version tags
@@ -188,6 +200,24 @@ After the operator upgrade is complete, you can upgrade Redis Enterprise cluster
188200
versionTag: <new-version-tag>
189201
```
190202

203+
1. Define any user-defined modules used by databases in the cluster.
204+
205+
```YAML
206+
spec:
207+
userDefinedModules:
208+
- name: "custom-module"
209+
source:
210+
https:
211+
url: "https://modules.company.com/search-v2.1.zip"
212+
credentialsSecret: "module-repo-creds"
213+
```
214+
215+
The `name` field must match the `display_name` or `module_name` that appears in the module manifest (for example, "redisgears"). This enables the operator to run validation on the user-defined module. If these names don't match, the operator can't run validation on the user-defined module and preventable errors may occur.
216+
217+
{{< note >}}
218+
Adding or modifying the `userDefinedModules` list triggers a rolling restart of the Redis Enterprise cluster pods in addition to the rolling upgrade for the version change.
219+
{{< /note >}}
220+
191221
1. Save the changes to apply.
192222

193223
### Reapply roles and role bindings
@@ -224,6 +254,10 @@ For Active-Active databases, the `redis.Version` change only needs to be applied
224254
225255
If your REAADB uses supported modules, keep the existing `moduleList` version numbers unchanged when upgrading `redisVersion`. The database will automatically use the module versions that are bundled with the new Redis version, regardless of what versions are specified in `moduleList`. After the upgrade is complete, you can optionally change the old version numbers from `moduleList`, but this change has no functional impact.
226256
257+
#### Upgrade with user-defined modules
258+
259+
If a user-defined module is used by any database in the cluster, the module must be defined in the REC custom resource before upgrading the database. See [Add user-defined modules to the REC]({{< relref "/operate/kubernetes/re-databases/modules#add-user-defined-modules-to-the-rec" >}}) for detailed instructions.
260+
227261
#### General upgrade notes
228262
229263
Note that if your cluster [`redisUpgradePolicy`]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/api/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.
@@ -251,5 +285,3 @@ curl -sfk -u <rec_username>:<rec_password> -X POST -H "Content-Type: application
251285
```
252286

253287
After updating the database with the Redis Software API, update the REDB custom resource to reflect the change.
254-
255-

content/operate/kubernetes/upgrade/upgrade-olm.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,15 @@ Your Redis Enterprise clusters must be running version 7.4.2-2 or later before u
3535

3636
Your 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]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_database_api#redisversion" >}}).
3737

38-
#### RHEL9-compatible modules
38+
### User-defined modules
3939

40-
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.
40+
If your databases use user-defined modules (custom non-bundled modules):
4141

42-
To see which modules you have installed, run:
42+
- Set `autoUpgradeRedisEnterprise: false` in the REC custom resource before upgrading the operator.
43+
- Define the user-defined modules in the REC custom resource before upgrading the database.
44+
- See [Edit `redisEnterpriseImageSpec`](#edit-redisenterpriseimagespec) for more details.
4345

44-
```sh
45-
curl -k -u <rec_username>:<rec_password> -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
46-
```
47-
48-
To see which modules are currently in use, run:
49-
50-
```sh
51-
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/bdbs | jq -r '.[].module_list | map(.module_name + "-" + .semantic_version) | .[]'
52-
```
53-
54-
See [Upgrade modules]({{<relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module">}}) for details on how to upgrade modules with the `rladmin` tool.
46+
For more information about user-defined modules, see [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}).
5547

5648
### Valid license
5749

@@ -111,6 +103,24 @@ After the operator upgrade is complete, you can upgrade Redis Enterprise cluster
111103
versionTag: <new-version-tag>
112104
```
113105

106+
1. Define any user-defined modules used by databases in the cluster.
107+
108+
```YAML
109+
spec:
110+
userDefinedModules:
111+
- name: "custom-module"
112+
source:
113+
https:
114+
url: "https://modules.company.com/search-v2.1.zip"
115+
credentialsSecret: "module-repo-creds"
116+
```
117+
118+
The `name` field must match the `display_name` or `module_name` that appears in the module manifest (for example, "redisgears"). This enables the operator to run validation on the user-defined module. If these names don't match, the operator can't run validation on the user-defined module and preventable errors may occur.
119+
120+
{{< note >}}
121+
Adding or modifying the `userDefinedModules` list triggers a rolling restart of the Redis Enterprise cluster pods in addition to the rolling upgrade for the version change.
122+
{{< /note >}}
123+
114124
1. Save the changes to apply.
115125

116126
### Reapply roles and role bindings

content/operate/kubernetes/upgrade/upgrade-redis-cluster.md

Lines changed: 63 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,15 @@ Check the [Redis Enterprise for Kubernetes release notes]({{<relref "/operate/ku
3535

3636
Check the release notes for your target version to determine the minimum Redis database version required. See [upgrade databases](#upgrade-databases) for detailed steps. You can find your database version in the [REDB `spec.redisVersion` field]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_database_api#redisversion" >}}).
3737

38-
### Module compatibility
38+
### User-defined modules
3939

40-
Some Redis Enterprise operator versions may require specific module versions or involve changes to the underlying operating system. If your databases use modules, check the release notes for your target version to determine if you need to manually install updated modules.
40+
If your databases use user-defined modules (custom non-bundled modules):
4141

42-
To see which modules you have installed, run:
42+
- Set `autoUpgradeRedisEnterprise: false` in the REC custom resource before upgrading the operator.
43+
- Define the user-defined modules in the REC custom resource before upgrading the database.
44+
- See [Edit `redisEnterpriseImageSpec`](#edit-redisenterpriseimagespec-in-the-rec-spec) for more details.
4345

44-
```sh
45-
curl -k -u <rec_username>:<rec_password> -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
46-
```
47-
48-
To see which modules are currently in use, run:
49-
50-
```sh
51-
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/bdbs | jq -r '.[].module_list | map(.module_name + "-" + .semantic_version) | .[]'
52-
```
53-
54-
See [Upgrade modules]({{<relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module">}}) for details on how to upgrade modules with the `rladmin` tool.
46+
For more information about user-defined modules, see [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}).
5547

5648
### Valid license
5749

@@ -86,6 +78,8 @@ For detailed Helm upgrade instructions, see [Upgrade the chart]({{<relref "/oper
8678

8779
## Upgrade the operator
8880

81+
{{<warning>}}If your databases use user-defined modules, set `autoUpgradeRedisEnterprise: false` in the REC custom resource before upgrading the operator.{{</warning>}}
82+
8983
### Download the bundle
9084

9185
Make sure you pull the correct version of the bundle. You can find the version tags
@@ -164,11 +158,9 @@ Before beginning the upgrade of the Redis Enterprise cluster, check the [Redis E
164158

165159
After the operator upgrade is complete, you can upgrade Redis Enterprise cluster (REC).
166160

167-
### Upgrade an REC with an Active-Active database
168-
169-
We recommend upgrading all participating clusters to the same operator version.
170-
171-
If you are upgrading from a preview version of the Active-Active controller, you can remove the following environment variables: `ACTIVE_ACTIVE_DATABASE_CONTROLLER_ENABLED`, `REMOTE_CLUSTER_CONTROLLER_ENABLED`, and `ENABLE_ALPHA_FEATURES`.
161+
{{<note>}}
162+
For Active-Active databases, we recommend upgrading all participating clusters to the same operator version.
163+
{{</note>}}
172164

173165
### Edit `redisEnterpriseImageSpec` in the REC spec
174166

@@ -188,6 +180,24 @@ If you are upgrading from a preview version of the Active-Active controller, you
188180
versionTag: <new-version-tag>
189181
```
190182

183+
1. Define any user-defined modules used by databases in the cluster.
184+
185+
```YAML
186+
spec:
187+
userDefinedModules:
188+
- name: "custom-module"
189+
source:
190+
https:
191+
url: "https://modules.company.com/search-v2.1.zip"
192+
credentialsSecret: "module-repo-creds"
193+
```
194+
195+
The `name` field must match the `display_name` or `module_name` that appears in the module manifest (for example, "redisgears"). This enables the operator to run validation on the user-defined module. If these names don't match, the operator can't run validation on the user-defined module and preventable errors may occur.
196+
197+
{{< note >}}
198+
Adding or modifying the `userDefinedModules` list triggers a rolling restart of the Redis Enterprise cluster pods in addition to the rolling upgrade for the version change.
199+
{{< /note >}}
200+
191201
1. Save the changes to apply.
192202

193203
### Reapply roles and role bindings
@@ -214,24 +224,56 @@ To see the status of the current rolling upgrade, run:
214224
kubectl rollout status sts <REC_name>
215225
```
216226
217-
### Upgrade databases
227+
## Upgrade databases
218228
219229
After the cluster is upgraded, you can upgrade your databases.
220230
231+
### Upgrade REDB
232+
221233
To upgrade your REDB, specify your new database version in the `spec.redisVersion` field in the REDB or REAADB custom resources. Supported database versions for operator versions include "7.2", "7.4", "8.0", and "8.2" (note this value is a string).
222234
235+
### Upgrade REAADB
236+
223237
For Active-Active databases, the `redis.Version` change only needs to be applied on one participating cluster and will automatically propagate to all other participating clusters. All participating clusters must be running operator version 8.0.2-2 or later.
224238
225239
If your REAADB uses supported modules, keep the existing `moduleList` version numbers unchanged when upgrading `redisVersion`. The database will automatically use the module versions that are bundled with the new Redis version, regardless of what versions are specified in `moduleList`. After the upgrade is complete, you can optionally change the old version numbers from `moduleList`, but this change has no functional impact.
226240
227-
#### General upgrade notes
241+
### Upgrade with user-defined modules
242+
243+
If a user-defined module is used by any database in the cluster, the module must be defined in the REC custom resource before upgrading the database. See [Add user-defined modules to the REC]({{< relref "/operate/kubernetes/re-databases/modules#add-user-defined-modules-to-the-rec" >}}) for detailed instructions.
244+
245+
### Upgrade policy
228246
229247
Note that if your cluster [`redisUpgradePolicy`]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/api/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.
230248

231249
## Troubleshooting
232250

233251
If 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.
234252

253+
### User-defined modules
254+
255+
If your databases use user-defined modules and you encounter upgrade issues:
256+
257+
1. **Verify `autoUpgradeRedisEnterprise` is set to `false`**: Check the REC spec to ensure automatic upgrades are disabled.
258+
259+
```sh
260+
kubectl get rec <cluster-name> -o jsonpath='{.spec.autoUpgradeRedisEnterprise}'
261+
```
262+
263+
1. **Verify modules are defined in the REC**: Ensure all user-defined modules are listed in the REC `userDefinedModules` section before upgrading.
264+
265+
```sh
266+
kubectl get rec <cluster-name> -o jsonpath='{.spec.userDefinedModules}' | jq
267+
```
268+
269+
1. **Check module validation errors**: Review the REC status for module validation errors.
270+
271+
```sh
272+
kubectl describe rec <cluster-name>
273+
```
274+
275+
For more information about user-defined modules, see [User-defined modules]({{< relref "/operate/kubernetes/re-databases/modules#user-defined-modules" >}}).
276+
235277
### Invalid module version
236278

237279
If 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.

0 commit comments

Comments
 (0)