Skip to content

Commit 4108650

Browse files
authored
Merge pull request #178 from RedisLabs/6.0.20-12
promoting version 6.0.20-12
2 parents 0ffa55a + 9927f39 commit 4108650

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+795
-418
lines changed

README.md

Lines changed: 98 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
* [Private Repositories](#private-repositories)
1111
* [Pull Secrets](#pull-secrets)
1212
* [Advanced Configuration](#advanced-configuration)
13+
* [Connect to Redis Enterprise Software web console](#Connect-to-Redis-Enterprise-Software-web-console)
1314
* [Upgrade](#upgrade)
1415
* [Supported K8S Distributions](#supported-k8s-distributions)
1516

16-
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/).
1722

1823
## Quickstart Guide
1924

@@ -27,9 +32,9 @@ This page describe how to deploy Redis Enterprise on Kubernetes using the Redis
2732
The following are the images and tags for this release:
2833
| Component | k8s | Openshift |
2934
| --- | --- | --- |
30-
| Redis Enterprise | `redislabs/redis:6.0.20-69` | `redislabs/redis:6.0.20-69.rhel7-openshift` |
31-
| Operator | `redislabs/operator:6.0.20-4` | `redislabs/operator:6.0.20-4` |
32-
| Services Rigger | `redislabs/k8s-controller:6.0.20-4` | `redislabs/k8s-controller:6.0.20-4` |
35+
| Redis Enterprise | `redislabs/redis:6.0.20-97` | `redislabs/redis:6.0.20-97.rhel7-openshift` |
36+
| Operator | `redislabs/operator:6.0.20-12` | `redislabs/operator:6.0.20-12` |
37+
| Services Rigger | `redislabs/k8s-controller:6.0.20-12` | `redislabs/k8s-controller:6.0.20-12` |
3338
> * RedHat certified images are available on [Redhat Catalog](https://access.redhat.com/containers/#/product/71f6d1bb3408bd0d) </br>
3439
3540

@@ -65,6 +70,7 @@ This is the fastest way to get up and running with a new Redis Enterprise on Kub
6570
kubectl apply -f service_account.yaml
6671
kubectl apply -f crds/v1/rec_crd.yaml
6772
kubectl apply -f crds/v1alpha1/redb_crd.yaml
73+
kubectl apply -f admission-service.yaml
6874
kubectl apply -f operator.yaml
6975
```
7076

@@ -98,10 +104,6 @@ This is the fastest way to get up and running with a new Redis Enterprise on Kub
98104
5. Redis Enterprise Database (REDB) Admission Controller:
99105
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.
100106
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-
```
105107
* Wait for the secret to be created:
106108
```shell script
107109
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
115117
```shell script
116118
# save cert
117119
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 -
119121
120122
# create patch file
121123
cat > modified-webhook.yaml <<EOF
122124
webhooks:
123-
- admissionReviewVersions:
125+
- name: redb.admission.redislabs
124126
clientConfig:
125127
caBundle: $CERT
126-
name: redb.admission.redislabs
127128
admissionReviewVersions: ["v1beta1"]
128129
EOF
129130
# 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
153154
6. Redis Enterprise Database custom resource - `RedisEnterpriseDatabase`
154155
155156
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-
159157
The Redis Enterprise Operator can be instructed to manage databases on the Redis Enterprise Cluster using the REDB custom resource.
160158
Example:
161159
```yaml
@@ -222,11 +220,7 @@ Other custom configurations are referenced in this repository.
222220
6. Redis Enterprise Database (REDB) Admission Controller:
223221
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.
224222
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
230224
```shell script
231225
kubectl get secret admission-tls
232226
NAME TYPE DATA AGE
@@ -298,8 +292,7 @@ Other custom configurations are referenced in this repository.
298292
299293
### Installation on VMWare Tanzu
300294
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+
303296
## Configuration
304297
305298
### RedisEnterpriseCluster custom resource
@@ -310,7 +303,7 @@ The operator deploys a `RedisEnterpriseCluster` with default configurations valu
310303
redisEnterpriseImageSpec:
311304
imagePullPolicy: IfNotPresent
312305
repository: redislabs/redis
313-
versionTag: 6.0.20-69
306+
versionTag: 6.0.20-97
314307
```
315308
316309
* Persistence
@@ -412,21 +405,21 @@ For example:
412405
redisEnterpriseImageSpec:
413406
imagePullPolicy: IfNotPresent
414407
repository: harbor.corp.local/redisenterprise/redis
415-
versionTag: 6.0.20-69
408+
versionTag: 6.0.20-97
416409
```
417410
418411
```yaml
419412
redisEnterpriseServicesRiggerImageSpec:
420413
imagePullPolicy: IfNotPresent
421414
repository: harbor.corp.local/redisenterprise/k8s-controller
422-
versionTag: 6.0.20-4
415+
versionTag: 6.0.20-12
423416
```
424417
425418
```yaml
426419
bootstrapperImageSpec:
427420
imagePullPolicy: IfNotPresent
428421
repository: harbor.corp.local/redisenterprise/operator
429-
versionTag: 6.0.20-4
422+
versionTag: 6.0.20-12
430423
```
431424
432425
In Operator Deployment spec (operator.yaml):
@@ -438,7 +431,7 @@ spec:
438431
spec:
439432
containers:
440433
- name: redis-enterprise-operator
441-
image: harbor.corp.local/redisenterprise/operator:6.0.20-4
434+
image: harbor.corp.local/redisenterprise/operator:6.0.20-12
442435
```
443436
444437
Image specification follow the [K8s Container schema](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core).
@@ -485,11 +478,82 @@ spec:
485478
- Full [Redis Enterprise Database Custom Resource Specification](redis_enterprise_database_api.md)
486479
487480
</br> </br>
481+
482+
## Connect to Redis Enterprise Software web console
483+
484+
The username and password for the web console are stored in a secret with the Redis Enterprise Cluster name on the k8s.
485+
in order to connect to the web console the port-forward or load balancer can be used.
486+
487+
First, extract the username and password from the secret:
488+
1. Switch to the namespace with the Redis Enterprise Cluster via the command below (replace <namespace> with the relevant namespace):
489+
```bash
490+
kubectl config set-context --current --namespace=<namespace>
491+
```
492+
![Alt text](./images/web_console_1.png?raw=true)
493+
2. List the secrets via the command:
494+
```bash
495+
kubectl get secret
496+
```
497+
![Alt text](./images/web_console_2.png?raw=true)
498+
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+
![Alt text](./images/web_console_3.png?raw=true)
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+
![Alt text](./images/web_console_4.png?raw=true)
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+
![Alt text](./images/web_console_5.png?raw=true)
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.
520+
```bash
521+
kubectl port-forward service/<cluster name>-ui <local port>:<service port>
522+
```
523+
![Alt text](./images/web_console_6.png?raw=true)
524+
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+
![Alt text](./images/web_console_7.png?raw=true)
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:
532+
```bash
533+
kubectl patch rec <cluster name> --type merge --patch "{\"spec\":{\"uiServiceType\":\"LoadBalancer\"}}"
534+
```
535+
![Alt text](./images/web_console_8.png?raw=true)
536+
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+
![Alt text](./images/web_console_9.png?raw=true)
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+
![Alt text](./images/web_console_10.png?raw=true)
546+
547+
Note: in the examples above the Redis Enterprise Cluster name is: 'rec' and the namespace is 'demo'.
548+
549+
</br> </br>
550+
488551
## Upgrade
552+
489553
The Operator automates and simplifies the upgrade process.
490554
The Redis Enterprise Cluster Software, and the Redis Enterprise Operator for Kubernetes versions are tightly coupled and should be upgraded together.
491555
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
493557
494558
```yaml
495559
autoUpgradeRedisEnterprise: true
@@ -498,7 +562,7 @@ There are two ways to upgrade - either set 'autoUpgradeRedisEnterprise' within t
498562
Alternatively:
499563
```yaml
500564
RedisEnterpriseImageSpec:
501-
versionTag: redislabs/redis:6.0.20-69
565+
versionTag: redislabs/redis:6.0.20-97
502566
```
503567
504568
## Supported K8S Distributions
@@ -507,7 +571,6 @@ Supported versions (platforms/versions that are not listed are not supported):
507571
| Distribution | Support Status |
508572
|---------------------------------|----------------|
509573
| Openshift 3.11 (K8s 1.11) | supported |
510-
| Openshift 4.4 (K8s 1.17) | deprecated |
511574
| OpenShift 4.5 (K8s 1.18) | supported |
512575
| OpenShift 4.6 (K8s 1.19) | supported |
513576
| OpenShift 4.7 (K8s 1.20) | supported |
@@ -517,9 +580,7 @@ Supported versions (platforms/versions that are not listed are not supported):
517580
| KOPS vanilla 1.18 | supported |
518581
| KOPS vanilla 1.19 | supported |
519582
| KOPS vanilla 1.20 | supported |
520-
| GKE 1.15 | deprecated |
521-
| GKE 1.16 | deprecated |
522-
| GKE 1.17 | supported |
583+
| GKE 1.17* | deprecated |
523584
| GKE 1.18 | supported |
524585
| GKE 1.19 | supported |
525586
| GKE 1.20 | supported |
@@ -528,9 +589,11 @@ Supported versions (platforms/versions that are not listed are not supported):
528589
| Rancher 2.5 (K8s 1.17) | supported |
529590
| Rancher 2.5 (K8s 1.18) | supported |
530591
| Rancher 2.5 (K8s 1.19). | supported |
531-
| VMWare TKGIE*** 1.7 (K8s 1.16) | supported |
592+
| VMWare TKGIE** 1.7 (K8s 1.16) | deprecated |
593+
| VMWare TKGIE** 1.8 (K8s 1.17) | deprecated |
594+
| VMWare TKGIE*** 1.10 (K8s 1.19) | supported |
532595
| AKS 1.18 | supported |
533596
534-
\* No longer supported by Red Hat
535-
\*\* No longer supported by Google
597+
\* No longer supported by Google
598+
\*\* No longer supported by VMware
536599
\*\*\* Tanzu Kubernetes Grid Integrated Edition

admission/service.yaml renamed to admission-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
protocol: TCP
99
targetPort: 8443
1010
selector:
11-
app: redb-admission
11+
name: redis-enterprise-operator

admission.bundle.yaml

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)