content/operate/kubernetes/7.8.6/active-active/create-reaadb.md
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]({{< relref "/operate/kubernetes/7.8.6/deployment/quick-start.md#enable-the-admission-controller/" >}}). {{<note>}}These are installed and enabled by default on clusters created via the OpenShift OperatorHub. {{</note>}}
Create two or more [RedisEnterpriseCluster (REC) custom resources]({{< relref "/operate/kubernetes/7.8.6/deployment/quick-start#create-a-redis-enterprise-cluster-rec" >}}) with enough [memory resources]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}).
<rec-name>)<rec-namespace>)Configure the REC [ingressOrRoutes field]({{< relref "/operate/kubernetes/7.8.6/networking/ingressorroutespec.md" >}}) and [create DNS records]({{< relref "/operate/kubernetes/7.8.6/networking/ingressorroutespec#configure-dns/" >}}).
api-<rec-name>-<rec-namespace>.<subdomain>)-db-<rec-name>-<rec-namespace>.<subdomain>)[Prepare participating clusters]({{< relref "/operate/kubernetes/7.8.6/active-active/prepare-clusters.md" >}})
<rerc-name>)redis-enterprise-<rerc-name>)For a list of example values used throughout this article, see the Example values section.
RedisEnterpriseRemoteCluster resources {#create-rerc}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 named rec-chicago in the namespace ns-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-ohare
Example RERC (rerc-raegan) for the REC named rec-arlington in the namespace ns-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-reagan
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/7.8.6/reference/redis_enterprise_remote_cluster_api">}}).
Create a Redis Enterprise remote cluster from each RERC custom resource file.
kubectl create -f <rerc-file>
Check the status of your RERC. If STATUS is Active and SPEC STATUS is Valid, 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 true
In case of errors, review the RERC custom resource events and the Redis Enterprise operator logs.
RedisEnterpriseActiveActiveDatabase resource {#create-reaadb}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:
Example REAADB named reaadb-boeing linked to the REC named rec-chicago with 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-reagan
{{<note>}}Sharding is disabled on Active-Active databases created with a shardCount of 1. Sharding cannot be enabled after database creation. {{</note>}}
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/7.8.6/reference/redis_enterprise_remote_cluster_api">}}).
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 STATUS is Active and SPEC STATUS is Valid, 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 up
In case of errors, review the REAADB custom resource events and the Redis Enterprise operator logs.
This article uses the following example values:
rec-chicagons-illinoisrerc-ohareredis-enterprise-rerc-ohareapi-rec-chicago-ns-illinois.example.com-db-rec-chicago-ns-illinois.example.comrec-arlingtonns-virginiarerc-raeganredis-enterprise-rerc-reaganapi-rec-arlington-ns-virginia.example.com-db-rec-arlington-ns-virginia.example.com