Create Active-Active database (REAADB)
| Redis Enterprise for Kubernetes | 
|---|
Prerequisites
To create an Active-Active database, make sure you've completed all the following steps and have gathered the information listed below each step.
- 
Configure the admission controller and ValidatingWebhook. Note:These are installed and enabled by default on clusters created via the OpenShift OperatorHub.
- 
Create two or more RedisEnterpriseCluster (REC) custom resources with enough memory resources. - Name of each REC (<rec-name>)
- Namespace for each REC (<rec-namespace>)
 
- Name of each REC (
- 
Configure the REC ingressOrRoutesfield and create DNS records.- REC API hostname (api-<rec-name>-<rec-namespace>.<subdomain>)
- Database hostname suffix (-db-<rec-name>-<rec-namespace>.<subdomain>)
 
- REC API hostname (
- 
Prepare participating clusters - RERC name (<rerc-name>)
- RERC secret name (redis-enterprise-<rerc-name>)
 
- RERC name (
For a list of example values used throughout this article, see the Example values section.
  Create RedisEnterpriseRemoteCluster resources
  
    
  
- 
Create a RedisEnterpriseRemoteCluster(RERC) custom resource file for each participating Redis Enterprise cluster (REC).Below are examples of RERC resources for two participating clusters. Substitute your own values to create your own resource. Example RERC ( rerc-ohare) for the REC namedrec-chicagoin the namespacens-illinois:apiVersion: app.redislabs.com/v1alpha1 kind: RedisEnterpriseRemoteCluster metadata: name: rerc-ohare spec: recName: rec-chicago recNamespace: ns-illinois apiFqdnUrl: api-rec-chicago-ns-illinois.example.com dbFqdnSuffix: -db-rec-chicago-ns-illinois.example.com secretName: redis-enterprise-rerc-ohareExample RERC ( rerc-raegan) for the REC namedrec-arlingtonin the namespacens-virginia:apiVersion: app.redislabs.com/v1alpha1 kind: RedisEnterpriseRemoteCluster metadata: name: rerc-reagan spec: recName: rec-arlington recNamespace: ns-virginia apiFqdnUrl: test-example-api-rec-arlington-ns-virginia.example.com dbFqdnSuffix: -example-cluster-rec-arlington-ns-virginia.example.com secretName: redis-enterprise-rerc-reaganFor more details on RERC fields, see the RERC API reference. 
- 
Create a Redis Enterprise remote cluster from each RERC custom resource file. kubectl create -f <rerc-file>
- 
Check the status of your RERC. If STATUSisActiveandSPEC STATUSisValid, then your configurations are correct.kubectl get rerc <rerc-name>The output should look similar to: kubectl get rerc rerc-ohare NAME STATUS SPEC STATUS LOCAL rerc-ohare Active Valid trueIn case of errors, review the RERC custom resource events and the Redis Enterprise operator logs. 
  Create RedisEnterpriseActiveActiveDatabase resource
  
    
  
- 
Create a RedisEnterpriseActiveActiveDatabase(REAADB) custom resource file meeting the naming requirements and listing the names of the RERC custom resources created in the last step.Naming requirements: - less than 63 characters
- contains only lowercase letters, numbers, or hyphens
- starts with a letter
- ends with a letter or digit
 Example REAADB named reaadb-boeinglinked to the REC namedrec-chicagowith two participating clusters and a global database configuration with shard count set to 3:apiVersion: app.redislabs.com/v1alpha1 kind: RedisEnterpriseActiveActiveDatabase metadata: name: reaadb-boeing spec: globalConfigurations: databaseSecretName: <my-secret> memorySize: 200MB shardCount: 3 participatingClusters: - name: rerc-ohare - name: rerc-reaganNote:Sharding is disabled on Active-Active databases created with ashardCountof 1. Sharding cannot be enabled after database creation.For more details on RERC fields, see the RERC API reference. 
- 
Create a Redis Enterprise Active-Active database from the REAADB custom resource file. kubectl create -f <reaadb-file>
- 
Check the status of your RERC. If STATUSisActiveandSPEC STATUSisValid, your configurations are correct.kubectl get reaadb <reaadb-name>The output should look similar to: kubectl get reaadb reaadb-boeing NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS reaadb-boeing active Valid upIn case of errors, review the REAADB custom resource events and the Redis Enterprise operator logs. 
Example values
This article uses the following example values:
Example cluster 1
- REC name: rec-chicago
- REC namespace: ns-illinois
- RERC name: rerc-ohare
- RERC secret name: redis-enterprise-rerc-ohare
- API FQDN: api-rec-chicago-ns-illinois.example.com
- DB FQDN suffix: -db-rec-chicago-ns-illinois.example.com
Example cluster 2
- REC name: rec-arlington
- REC namespace: ns-virginia
- RERC name: rerc-raegan
- RERC secret name: redis-enterprise-rerc-reagan
- API FQDN: api-rec-arlington-ns-virginia.example.com
- DB FQDN suffix: -db-rec-arlington-ns-virginia.example.com