Skip to content

Doc 5497 #1969

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

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions content/embeds/k8s/ns-illinois.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: ns-illinois
```
6 changes: 6 additions & 0 deletions content/embeds/k8s/ns-virginia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: ns-virginia
```
14 changes: 14 additions & 0 deletions content/embeds/k8s/reaadb-boeing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```yaml
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-raegan
```
19 changes: 19 additions & 0 deletions content/embeds/k8s/rec-arlington.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```yaml
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec-arlington
namespace: ns-virginia
spec:
nodes: 3
persistentSpec:
enabled: true
volumeSize: 20Gi
redisEnterpriseNodeResources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 2
memory: 4Gi
```
19 changes: 19 additions & 0 deletions content/embeds/k8s/rec-chicago.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```yaml
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec-chicago
namespace: ns-illinois
spec:
nodes: 3
persistentSpec:
enabled: true
volumeSize: 20Gi
redisEnterpriseNodeResources:
requests:
cpu: 2
memory: 4Gi
limits:
cpu: 2
memory: 4Gi
```
12 changes: 12 additions & 0 deletions content/embeds/k8s/rerc-ohare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```yaml
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
```
12 changes: 12 additions & 0 deletions content/embeds/k8s/rerc-raegan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```yaml
apiVersion: app.redislabs.com/v1alpha1
kind: RedisEnterpriseRemoteCluster
metadata:
name: rerc-raegan
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-raegan
```
25 changes: 4 additions & 21 deletions content/operate/kubernetes/active-active/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,39 +52,22 @@ For versions 6.4.2 or earlier, this Active-Active setup method includes the foll

To create an Active-Active Redis Enterprise deployment for Kubernetes with these new features, first [prepare participating clusters]({{< relref "/operate/kubernetes/active-active/prepare-clusters" >}}) then [create an Active-Active database]({{< relref "/operate/kubernetes/active-active/create-reaadb" >}}).

### Preview versions

If you are using a preview version of these features (operator version 6.4.2-4 or 6.4.2-5), you'll need to enable the Active-Active controller with the following steps. You need to do this only once per cluster. We recommend using the fully supported 6.4.2-6 version.

1. Download the custom resource definitions (CRDs) for the most recent release (6.4.2-4) from [redis-enterprise-k8s-docs Github](https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/crds).

1. Apply the new CRDs for the Redis Enterprise Active-Active database (REAADB) and Redis Enterprise remote cluster (RERC) to install those controllers.

```sh
kubectl apply -f crds/reaadb_crd.yaml
kubectl apply -f crds/rerc_crd.yaml
```

1. Enable the Active-Active and remote cluster controllers on the operator ConfigMap.

```sh
kubectl patch cm operator-environment-config --type merge --patch "{\"data\": \
{\"ACTIVE_ACTIVE_DATABASE_CONTROLLER_ENABLED\":\"true\", \
\"REMOTE_CLUSTER_CONTROLLER_ENABLED\":\"true\"}}"


### REAADB custom resource

Redis Enterprise Active-Active database (REAADB) contains a link to the RERC for each participating cluster, and provides configuration and status to the management plane.

For a full list of fields and options, see the [REAADB API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_active_active_database_api">}}).

For examples, see the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.

### RERC custom resource

Redis Enterprise remote cluster (RERC) custom resource contains configuration details for all the participating clusters.

For a full list of fields and options, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).

For examples, see the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.

### Limitations

* Existing Redis databases cannot be migrated to a REAADB. (DOC-3594)
Expand Down
158 changes: 61 additions & 97 deletions content/operate/kubernetes/active-active/create-reaadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,127 +33,91 @@ To create an Active-Active database, make sure you've completed all the followin

For a list of example values used throughout this article, see the [Example values](#example-values) section.

## Create `RedisEnterpriseRemoteCluster` resources {#create-rerc}
## Create RERC custom resources {#create-rerc}

1. 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`:

```yaml
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`:

```yaml
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/reference/api/redis_enterprise_remote_cluster_api">}}).

1. Create a Redis Enterprise remote cluster from each RERC custom resource file.
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`:

{{<embed-yaml "k8s/rerc-ohare.md" "rerc-ohare.yaml">}}

Example RERC (`rerc-raegan`) for the REC named `rec-arlington` in the namespace `ns-virginia`:

{{<embed-yaml "k8s/rerc-raegan.md" "rerc-raegan.yaml">}}

For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).

2. Create a Redis Enterprise remote cluster from each RERC custom resource file.

```sh
kubectl create -f <rerc-file>
```
```sh
kubectl create -f <rerc-file>
```

1. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, then your configurations are correct.
3. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, then your configurations are correct.

```sh
kubectl get rerc <rerc-name>
```
```sh
kubectl get rerc <rerc-name>
```

The output should look similar to:
The output should look similar to:

```sh
kubectl get rerc rerc-ohare
```sh
kubectl get rerc rerc-ohare

NAME STATUS SPEC STATUS LOCAL
rerc-ohare Active Valid true
```
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.
In case of errors, review the RERC custom resource events and the Redis Enterprise operator logs.

## Create `RedisEnterpriseActiveActiveDatabase` resource {#create-reaadb}
## Create the REAADB {#create-reaadb}

1. 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-boeing` linked to the REC named `rec-chicago` with two participating clusters and a global database configuration with shard count set to 3:

```yaml
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/reference/api/redis_enterprise_remote_cluster_api">}}).

1. Create a Redis Enterprise Active-Active database from the REAADB custom resource file.

```sh
kubectl create -f <reaadb-file>
```
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-boeing` linked to the REC named `rec-chicago` with two participating clusters and a global database configuration with shard count set to 3:

{{<embed-yaml "k8s/reaadb-boeing.md" "reaadb-boeing.yaml">}}

1. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, your configurations are correct.
{{<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/reference/api/redis_enterprise_remote_cluster_api">}}).

2. Create a Redis Enterprise Active-Active database from the REAADB custom resource file.

```sh
kubectl get reaadb <reaadb-name>
```
```sh
kubectl create -f <reaadb-file>
```

The output should look similar to:
3. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, your configurations are correct.

```sh
kubectl get reaadb <reaadb-name>
```

```sh
kubectl get reaadb reaadb-boeing
The output should look similar to:

NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS
reaadb-boeing active Valid up
```
```sh
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.
In case of errors, review the REAADB custom resource events and the Redis Enterprise operator logs.

## Example values

This article uses the following example values:
This article uses the example values listed below. They can also be found in the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.

#### Example cluster 1
Example cluster 1:

* REC name: `rec-chicago`
* REC namespace: `ns-illinois`
Expand All @@ -162,7 +126,7 @@ This article uses the following example values:
* API FQDN: `api-rec-chicago-ns-illinois.example.com`
* DB FQDN suffix: `-db-rec-chicago-ns-illinois.example.com`

#### Example cluster 2
Example cluster 2:

* REC name: `rec-arlington`
* REC namespace: `ns-virginia`
Expand Down
2 changes: 1 addition & 1 deletion content/operate/kubernetes/active-active/edit-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ To communicate with other clusters, all participating clusters need access to th

1. From one of the existing participating clusters, create a `RedisEnterpriseRemoteCluster` (RERC) custom resource for the new participating cluster.

This example shows an RERC custom resource for an REC named `rec-boston` in the namespace `ns-massachusetts`.
This example (rerc-logan) shows an RERC custom resource for an REC named `rec-boston` in the namespace `ns-massachusetts`.

```yaml
apiVersion: app.redislabs.com/v1alpha1
Expand Down
9 changes: 6 additions & 3 deletions content/operate/kubernetes/active-active/edit-rerc.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ If the credentials are changed or updated for a REC participating cluster, you n

```sh
kubectl get reaadb reaadb-boeing

NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS
reaadb-boeing active Valid up
```
The output should look similar to:

```sh
NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS
reaadb-boeing active Valid up
```

To troubleshoot invalid configurations, view the RERC custom resource events and the [Redis Enterprise operator logs]({{< relref "/operate/kubernetes/logs/" >}}).

Expand Down
Loading