You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page describe how to deploy Redis Enterprise on Kubernetes using the Redis Enterprise Operator. High level architecture and overview of the solution can be found [HERE](https://docs.redislabs.com/latest/platforms/kubernetes/).
17
+
This page describes how to deploy Redis Enterprise on Kubernetes using the Redis Enterprise Operator. The Redis Enterprise Operator supports two Custom Resource Definitions (CRDs):
18
+
* Redis Enterprise Cluster (REC): an API to create Redis Enterprise clusters. Note that only one cluster is supported per operator deployment.
19
+
* Redis Enterprise Database (REDB): an API to create Redis databases running on the Redis Enterprise cluster.
20
+
Note that the Redis Enterprise Operator is namespaced.
21
+
High level architecture and overview of the solution can be found [HERE](https://docs.redislabs.com/latest/platforms/kubernetes/).
17
22
18
23
## Quickstart Guide
19
24
@@ -27,9 +32,9 @@ This page describe how to deploy Redis Enterprise on Kubernetes using the Redis
27
32
The following are the images and tags for this release:
The Admission Controlller is recommended for use. It uses the Redis Enterprise Cluster to dynamically validate that REDB resources as configured by the operator are valid.
100
106
Steps to configure the Admission Controller:
101
-
* Install the Admission Controller via a bundle:
102
-
```shell script
103
-
kubectl create -f admission.bundle.yaml
104
-
```
105
107
* Wait for the secret to be created:
106
108
```shell script
107
109
kubectl get secret admission-tls
@@ -115,15 +117,14 @@ This is the fastest way to get up and running with a new Redis Enterprise on Kub
115
117
```shell script
116
118
# save cert
117
119
CERT=`kubectl get secret admission-tls -o jsonpath='{.data.cert}'`
118
-
sed 's/NAMESPACE_OF_SERVICE_ACCOUNT/REPLACE_WITH_NAMESPACE/g'admission/webhook.yaml | kubectl create -f -
120
+
sed 's/NAMESPACE_OF_SERVICE_ACCOUNT/REPLACE_WITH_NAMESPACE/g' webhook.yaml | kubectl create -f -
119
121
120
122
# create patch file
121
123
cat > modified-webhook.yaml <<EOF
122
124
webhooks:
123
-
- admissionReviewVersions:
125
+
- name: redb.admission.redislabs
124
126
clientConfig:
125
127
caBundle: $CERT
126
-
name: redb.admission.redislabs
127
128
admissionReviewVersions: ["v1beta1"]
128
129
EOF
129
130
# patch webhook with caBundle
@@ -153,9 +154,6 @@ This is the fastest way to get up and running with a new Redis Enterprise on Kub
Create a `RedisEnterpriseDatabase` (REDB) by using Custom Resource.
156
-
157
-
> Note: An example REDB.yaml file may be found [HERE] (https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/examples/v1alpha1). This is an alternative to copying and pasting the example code below into the CLI
158
-
159
157
The Redis Enterprise Operator can be instructed to manage databases on the Redis Enterprise Cluster using the REDB custom resource.
160
158
Example:
161
159
```yaml
@@ -222,11 +220,7 @@ Other custom configurations are referenced in this repository.
The Admission Controlller is recommended for use. It uses the Redis Enterprise Cluster to dynamically validate that REDB resources as configured by the operator are valid.
224
222
Steps to configure the Admission Controller:
225
-
* Install the Admission Controller via a bundle:
226
-
```shell script
227
-
kubectl create -f admission.bundle.yaml
228
-
```
229
-
* Wait for the secret to be created:
223
+
* Wait for the secret to be created by the operator bundle deployment
230
224
```shell script
231
225
kubectl get secret admission-tls
232
226
NAME TYPE DATA AGE
@@ -298,8 +292,7 @@ Other custom configurations are referenced in this repository.
298
292
299
293
### Installation on VMWare Tanzu
300
294
Instruction on how to deploy the Operator on PKS can be found on the [Redis Labs documentation Website](https://docs.redislabs.com/latest/platforms/kubernetes/getting-started/tanzu/)
301
-
302
-
295
+
303
296
## Configuration
304
297
305
298
### RedisEnterpriseCluster custom resource
@@ -310,7 +303,7 @@ The operator deploys a `RedisEnterpriseCluster` with default configurations valu
3. Run the command below to view the secret with the credentials , replace the <cluster name> with the name of your Redis Enterprise Cluster:
499
+
```bash
500
+
kubectl get secret <cluster name> -o yaml
501
+
```
502
+

503
+
4. Extract the username and password via the commands below, replace the <cluster name> with the name of your Redis Enterprise Cluster:
504
+
```bash
505
+
kubectl get secret <cluster name> -o jsonpath='{.data.username}'| base64 --decode
506
+
kubectl get secret <cluster name> -o jsonpath='{.data.password}'| base64 --decode
507
+
```
508
+

509
+
510
+
Connect to the web console with one of the two following methods:
511
+
512
+
Method 1: using port-forward
513
+
1. Get the port of the cluster UI service via the command below (replace the <cluster name> with the name of your Redis Enterprise Cluster):
514
+
```bash
515
+
kubectl get service/<cluster name>-ui -o yaml
516
+
```
517
+
Note: the default port is 8443.
518
+

519
+
2. Run the kubectl port-forward service to set port-forward. Replace the <cluster name> with the name of your Redis Enterprise Cluster, replace <service port> with the port of the service, and replace <local port> with the port you want to use on the local machine.
3. View the web console from the web browser on your local machine:
525
+
https://localhost:<local port>
526
+
Don't forget to replace the <local port> with the one used in the previous command.
527
+

528
+
529
+
Method 2: load balancer
530
+
<note> Configuring a load balancer service for the UI will create an external IP address, widely available (when set on cloud providers which support external load balancers). Use with caution. </note>
531
+
1. Run the command below to set the UI service type as load balancer, replace the <cluster name> with the name of your Redis Enterprise Cluster:
2. Get the external IP and service port of the service via the command below:
537
+
```bash
538
+
kubectl get service/<cluster name>-ui
539
+
```
540
+
Note: the default port is 8443.
541
+

542
+
3. In the web browser on the local machine to see the Redis Enterprise web console go to:
543
+
https://<external IP>:<service port>
544
+
Don't forget to replace the <external IP> and <service port> with the values from the previous step.
545
+

546
+
547
+
Note: in the examples above the Redis Enterprise Cluster name is: 'rec' and the namespace is 'demo'.
548
+
549
+
</br></br>
550
+
488
551
## Upgrade
552
+
489
553
The Operator automates and simplifies the upgrade process.
490
554
The Redis Enterprise Cluster Software, and the Redis Enterprise Operator for Kubernetes versions are tightly coupled and should be upgraded together.
491
555
It is recommended to use the bundle.yaml to upgrade, as it loads all the relevant CRD documents for this version. If the updated CRDs are not loaded, the operator might fail.
492
-
There are two ways to upgrade - either set'autoUpgradeRedisEnterprise' within the Redis Enterprise Cluster Spec to instruct the operator to automatically upgrade to the compatible version, or specify the correct Redis Enterprise image manually using the versionTag attribute. The Redis Enterprise Version compatible with this release is 6.0.20-69
556
+
There are two ways to upgrade - either set'autoUpgradeRedisEnterprise' within the Redis Enterprise Cluster Spec to instruct the operator to automatically upgrade to the compatible version, or specify the correct Redis Enterprise image manually using the versionTag attribute. The Redis Enterprise Version compatible with this release is 6.0.20-97
493
557
494
558
```yaml
495
559
autoUpgradeRedisEnterprise: true
@@ -498,7 +562,7 @@ There are two ways to upgrade - either set 'autoUpgradeRedisEnterprise' within t
498
562
Alternatively:
499
563
```yaml
500
564
RedisEnterpriseImageSpec:
501
-
versionTag: redislabs/redis:6.0.20-69
565
+
versionTag: redislabs/redis:6.0.20-97
502
566
```
503
567
504
568
## Supported K8S Distributions
@@ -507,7 +571,6 @@ Supported versions (platforms/versions that are not listed are not supported):
0 commit comments