Set global database configurations
The REAADB contains the field '.spec.globalConfigurations'. Use this to set the database configurations.
| Redis Enterprise for Kubernetes | 
|---|
The Redis Enterprise Active-Active database (REAADB) custom resource contains the field .spec.globalConfigurations. This field sets configurations for the Active-Active database across all participating clusters, such as memory size, shard count, and the global database secrets.
The REAADB API reference contains a full list of available fields.
Edit global configurations
- 
Edit or patch the REAADB custom resource with your global configuration changes. The example command below patches the REAADB named reaadb-boeingto set the global memory size to 200MB:kubectl patch reaadb reaadb-boeing --type merge --patch \ '{"spec": {"globalConfigurations": {"memorySize": "200mb"}}}'
- 
Verify the status is activeand the spec status isValid.This example shows the status for the reaadb-boeingdatabase.kubectl get reaadb reaadb-boeing NAME STATUS SPEC STATUS GLOBAL CONFIGURATIONS REDB LINKED REDBS reaadb-boeing active Valid
- 
View the global configurations on each participating cluster to verify they are synced. kubectl get reaadb <reaadb-name> -o yaml
Edit global configuration secrets
This section edits the secrets under the REAADB .spec.globalConfigurations section. For more information and all available fields, see the REAADB API reference.
- 
On an existing participating cluster, generate a YAML file containing the database secret with the relevant data. This example shoes a secret named my-db-secretwith the passwordmy-passwordencoded in base 64.apiVersion: v1 data: password: bXktcGFzcw kind: Secret metadata: name: my-db-secret type: Opaque
- 
Apply the secret file from the previous step, substituting your own value for <db-secret-file>.kubectl apply -f <db-secret-file>
- 
Patch the REAADB custom resource to specify the database secret, substituting your own values for <reaadb-name>and<secret-name>.kubectl patch reaadb <reaadb-name> --type merge --patch \ '{"spec": {"globalConfigurations": {"databaseSecretName": "secret-name"}}}'
- 
Check the REAADB status for an activestatus andValidspec status.kubectl get reaadb <reaadb-name> NAME STATUS SPEC STATUS GLOBAL CONFIGURATIONS REDB LINKED REDBS reaadb-boeing active Valid
- 
On each other participating cluster, check the secret status. ``sh kubectl get reaadb -o=jsonpath='{.status.secretsStatus}' The output should show the status as `Invalid`. ```sh [{"name":"my-db-secret","status":"Invalid"}]
- 
Sync the secret on each participating cluster. kubectl apply -f <db-secret-file>
- 
Repeat the previous two steps on every participating cluster.