Skip to content

Commit f1fc6e9

Browse files
K8s: make AA yaml examples consistent (#1970)
* add yaml embeds to multi-ns * remove AA preview note * use AA yaml embeds * create AA example files * revise AA examples page * formatting and links * formatting edits * Apply suggestions from code review Co-authored-by: andy-stark-redis <[email protected]> --------- Co-authored-by: andy-stark-redis <[email protected]>
1 parent cd071fc commit f1fc6e9

File tree

14 files changed

+229
-255
lines changed

14 files changed

+229
-255
lines changed

content/embeds/k8s/ns-illinois.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```yaml
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: ns-illinois
6+
```

content/embeds/k8s/ns-virginia.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```yaml
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: ns-virginia
6+
```

content/embeds/k8s/reaadb-boeing.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```yaml
2+
apiVersion: app.redislabs.com/v1alpha1
3+
kind: RedisEnterpriseActiveActiveDatabase
4+
metadata:
5+
name: reaadb-boeing
6+
spec:
7+
globalConfigurations:
8+
databaseSecretName: <my-secret>
9+
memorySize: 200MB
10+
shardCount: 3
11+
participatingClusters:
12+
- name: rerc-ohare
13+
- name: rerc-raegan
14+
```

content/embeds/k8s/rec-arlington.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```yaml
2+
apiVersion: app.redislabs.com/v1
3+
kind: RedisEnterpriseCluster
4+
metadata:
5+
name: rec-arlington
6+
namespace: ns-virginia
7+
spec:
8+
nodes: 3
9+
persistentSpec:
10+
enabled: true
11+
volumeSize: 20Gi
12+
redisEnterpriseNodeResources:
13+
requests:
14+
cpu: 2
15+
memory: 4Gi
16+
limits:
17+
cpu: 2
18+
memory: 4Gi
19+
```

content/embeds/k8s/rec-chicago.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```yaml
2+
apiVersion: app.redislabs.com/v1
3+
kind: RedisEnterpriseCluster
4+
metadata:
5+
name: rec-chicago
6+
namespace: ns-illinois
7+
spec:
8+
nodes: 3
9+
persistentSpec:
10+
enabled: true
11+
volumeSize: 20Gi
12+
redisEnterpriseNodeResources:
13+
requests:
14+
cpu: 2
15+
memory: 4Gi
16+
limits:
17+
cpu: 2
18+
memory: 4Gi
19+
```

content/embeds/k8s/rerc-ohare.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```yaml
2+
apiVersion: app.redislabs.com/v1alpha1
3+
kind: RedisEnterpriseRemoteCluster
4+
metadata:
5+
name: rerc-ohare
6+
spec:
7+
recName: rec-chicago
8+
recNamespace: ns-illinois
9+
apiFqdnUrl: api-rec-chicago-ns-illinois.example.com
10+
dbFqdnSuffix: -db-rec-chicago-ns-illinois.example.com
11+
secretName: redis-enterprise-rerc-ohare
12+
```

content/embeds/k8s/rerc-raegan.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```yaml
2+
apiVersion: app.redislabs.com/v1alpha1
3+
kind: RedisEnterpriseRemoteCluster
4+
metadata:
5+
name: rerc-raegan
6+
spec:
7+
recName: rec-arlington
8+
recNamespace: ns-virginia
9+
apiFqdnUrl: test-example-api-rec-arlington-ns-virginia.example.com
10+
dbFqdnSuffix: -example-cluster-rec-arlington-ns-virginia.example.com
11+
secretName: redis-enterprise-rerc-raegan
12+
```

content/operate/kubernetes/active-active/_index.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,22 @@ For versions 6.4.2 or earlier, this Active-Active setup method includes the foll
5252

5353
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" >}}).
5454

55-
### Preview versions
56-
57-
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.
58-
59-
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).
60-
61-
1. Apply the new CRDs for the Redis Enterprise Active-Active database (REAADB) and Redis Enterprise remote cluster (RERC) to install those controllers.
62-
63-
```sh
64-
kubectl apply -f crds/reaadb_crd.yaml
65-
kubectl apply -f crds/rerc_crd.yaml
66-
```
67-
68-
1. Enable the Active-Active and remote cluster controllers on the operator ConfigMap.
69-
70-
```sh
71-
kubectl patch cm operator-environment-config --type merge --patch "{\"data\": \
72-
{\"ACTIVE_ACTIVE_DATABASE_CONTROLLER_ENABLED\":\"true\", \
73-
\"REMOTE_CLUSTER_CONTROLLER_ENABLED\":\"true\"}}"
74-
75-
7655
### REAADB custom resource
7756

7857
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.
7958

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

61+
For examples, see the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.
62+
8263
### RERC custom resource
8364

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

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

69+
For examples, see the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.
70+
8871
### Limitations
8972

9073
* Existing Redis databases cannot be migrated to a REAADB. (DOC-3594)

content/operate/kubernetes/active-active/create-reaadb.md

Lines changed: 61 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -33,127 +33,91 @@ To create an Active-Active database, make sure you've completed all the followin
3333

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

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

3838
1. Create a `RedisEnterpriseRemoteCluster` (RERC) custom resource file for each participating Redis Enterprise cluster (REC).
3939

40-
Below are examples of RERC resources for two participating clusters. Substitute your own values to create your own resource.
41-
42-
Example RERC (`rerc-ohare`) for the REC named `rec-chicago` in the namespace `ns-illinois`:
43-
44-
```yaml
45-
apiVersion: app.redislabs.com/v1alpha1
46-
kind: RedisEnterpriseRemoteCluster
47-
metadata:
48-
name: rerc-ohare
49-
spec:
50-
recName: rec-chicago
51-
recNamespace: ns-illinois
52-
apiFqdnUrl: api-rec-chicago-ns-illinois.example.com
53-
dbFqdnSuffix: -db-rec-chicago-ns-illinois.example.com
54-
secretName: redis-enterprise-rerc-ohare
55-
```
56-
57-
Example RERC (`rerc-raegan`) for the REC named `rec-arlington` in the namespace `ns-virginia`:
58-
59-
```yaml
60-
apiVersion: app.redislabs.com/v1alpha1
61-
kind: RedisEnterpriseRemoteCluster
62-
metadata:
63-
name: rerc-reagan
64-
spec:
65-
recName: rec-arlington
66-
recNamespace: ns-virginia
67-
apiFqdnUrl: test-example-api-rec-arlington-ns-virginia.example.com
68-
dbFqdnSuffix: -example-cluster-rec-arlington-ns-virginia.example.com
69-
secretName: redis-enterprise-rerc-reagan
70-
```
71-
72-
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).
73-
74-
1. Create a Redis Enterprise remote cluster from each RERC custom resource file.
40+
Below are examples of RERC resources for two participating clusters. Substitute your own values to create your own resource.
41+
42+
Example RERC (`rerc-ohare`) for the REC named `rec-chicago` in the namespace `ns-illinois`:
43+
44+
{{<embed-yaml "k8s/rerc-ohare.md" "rerc-ohare.yaml">}}
45+
46+
Example RERC (`rerc-raegan`) for the REC named `rec-arlington` in the namespace `ns-virginia`:
47+
48+
{{<embed-yaml "k8s/rerc-raegan.md" "rerc-raegan.yaml">}}
49+
50+
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).
51+
52+
2. Create a Redis Enterprise remote cluster from each RERC custom resource file.
7553

76-
```sh
77-
kubectl create -f <rerc-file>
78-
```
54+
```sh
55+
kubectl create -f <rerc-file>
56+
```
7957

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

82-
```sh
83-
kubectl get rerc <rerc-name>
84-
```
60+
```sh
61+
kubectl get rerc <rerc-name>
62+
```
8563

86-
The output should look similar to:
64+
The output should look similar to:
8765

88-
```sh
89-
kubectl get rerc rerc-ohare
66+
```sh
67+
kubectl get rerc rerc-ohare
9068

91-
NAME STATUS SPEC STATUS LOCAL
92-
rerc-ohare Active Valid true
93-
```
69+
NAME STATUS SPEC STATUS LOCAL
70+
rerc-ohare Active Valid true
71+
```
9472

95-
In case of errors, review the RERC custom resource events and the Redis Enterprise operator logs.
73+
In case of errors, review the RERC custom resource events and the Redis Enterprise operator logs.
9674

97-
## Create `RedisEnterpriseActiveActiveDatabase` resource {#create-reaadb}
75+
## Create the REAADB {#create-reaadb}
9876

9977
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.
10078

101-
Naming requirements:
102-
* less than 63 characters
103-
* contains only lowercase letters, numbers, or hyphens
104-
* starts with a letter
105-
* ends with a letter or digit
106-
107-
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:
108-
109-
```yaml
110-
apiVersion: app.redislabs.com/v1alpha1
111-
kind: RedisEnterpriseActiveActiveDatabase
112-
metadata:
113-
name: reaadb-boeing
114-
spec:
115-
globalConfigurations:
116-
databaseSecretName: <my-secret>
117-
memorySize: 200MB
118-
shardCount: 3
119-
participatingClusters:
120-
- name: rerc-ohare
121-
- name: rerc-reagan
122-
```
123-
124-
{{<note>}}Sharding is disabled on Active-Active databases created with a `shardCount` of 1. Sharding cannot be enabled after database creation. {{</note>}}
125-
126-
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).
127-
128-
1. Create a Redis Enterprise Active-Active database from the REAADB custom resource file.
129-
130-
```sh
131-
kubectl create -f <reaadb-file>
132-
```
79+
Naming requirements:
80+
* less than 63 characters
81+
* contains only lowercase letters, numbers, or hyphens
82+
* starts with a letter
83+
* ends with a letter or digit
84+
85+
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:
86+
87+
{{<embed-yaml "k8s/reaadb-boeing.md" "reaadb-boeing.yaml">}}
13388

134-
1. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, your configurations are correct.
89+
{{<note>}}Sharding is disabled on Active-Active databases created with a `shardCount` of 1. Sharding cannot be enabled after database creation. {{</note>}}
90+
91+
For more details on RERC fields, see the [RERC API reference]({{<relref "/operate/kubernetes/reference/api/redis_enterprise_remote_cluster_api">}}).
92+
93+
2. Create a Redis Enterprise Active-Active database from the REAADB custom resource file.
13594

136-
```sh
137-
kubectl get reaadb <reaadb-name>
138-
```
95+
```sh
96+
kubectl create -f <reaadb-file>
97+
```
13998

140-
The output should look similar to:
99+
3. Check the status of your RERC. If `STATUS` is `Active` and `SPEC STATUS` is `Valid`, your configurations are correct.
100+
101+
```sh
102+
kubectl get reaadb <reaadb-name>
103+
```
141104

142-
```sh
143-
kubectl get reaadb reaadb-boeing
105+
The output should look similar to:
144106

145-
NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS
146-
reaadb-boeing active Valid up
147-
```
107+
```sh
108+
kubectl get reaadb reaadb-boeing
148109

110+
NAME STATUS SPEC STATUS LINKED REDBS REPLICATION STATUS
111+
reaadb-boeing active Valid up
112+
```
149113

150-
In case of errors, review the REAADB custom resource events and the Redis Enterprise operator logs.
114+
In case of errors, review the REAADB custom resource events and the Redis Enterprise operator logs.
151115

152116
## Example values
153117

154-
This article uses the following example values:
118+
This article uses the example values listed below. You can also find them in the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/active-active" >}}) section.
155119

156-
#### Example cluster 1
120+
Example cluster 1:
157121

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

165-
#### Example cluster 2
129+
Example cluster 2:
166130

167131
* REC name: `rec-arlington`
168132
* REC namespace: `ns-virginia`

content/operate/kubernetes/active-active/edit-clusters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To communicate with other clusters, all participating clusters need access to th
7575

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

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

8080
```yaml
8181
apiVersion: app.redislabs.com/v1alpha1

0 commit comments

Comments
 (0)