From 220f64098b6b80fb4fb16818750a5189b711f978 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Tue, 24 Sep 2024 09:36:12 -0500 Subject: [PATCH 01/11] spacing --- .../deployment/openshift/openshift-cli.md | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index f929c79c71..3e789fc2de 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -23,19 +23,19 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift 1. Create a new project. - ```bash + ```sh oc new-project ``` 1. Verify the newly created project. - ```bash + ```sh oc project ``` 1. Get the deployment files. - ```bash + ```sh git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs ``` @@ -52,13 +52,13 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift 1. Verify that your `redis-enterprise-operator` deployment is running. - ```bash + ```sh oc get deployment ``` A typical response looks like this: - ```bash + ```sh NAME READY UP-TO-DATE AVAILABLE AGE redis-enterprise-operator 1/1 1 1 0m36s ``` @@ -115,7 +115,7 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi 1. Apply the custom resource file to create your Redis Enterprise cluster. - ```bash + ```sh oc apply -f .yaml ``` @@ -149,38 +149,38 @@ If not limited, the webhook intercepts requests from all namespaces. If you have 1. Verify your namespace is labeled and the label is unique to this namespace, as shown in the next example. - ```bash - apiVersion: v1 - kind: Namespace - metadata: - labels: - namespace-name: staging - name: staging - ``` + ```sh + apiVersion: v1 + kind: Namespace + metadata: + labels: + namespace-name: staging + name: staging + ``` 1. Patch the webhook spec with the `namespaceSelector` field. - ```bash - cat > modified-webhook.yaml < modified-webhook.yaml <}} For releases before 6.4.2-4, use this command instead: - ```sh - oc patch ValidatingWebhookConfiguration \ - redb-admission --patch "$(cat modified-webhook.yaml)" - ``` + ```sh + oc patch ValidatingWebhookConfiguration \ + redb-admission --patch "$(cat modified-webhook.yaml)" + ``` The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). {{}} @@ -189,22 +189,22 @@ If not limited, the webhook intercepts requests from all namespaces. If you have Apply an invalid resource as shown below to force the admission controller to reject it. If it applies successfully, the admission controller is not installed correctly. -```bash - oc apply -f - << EOF - apiVersion: app.redislabs.com/v1alpha1 - kind: RedisEnterpriseDatabase - metadata: - name: redis-enterprise-database - spec: - evictionPolicy: illegal - EOF +```sh +oc apply -f - << EOF +apiVersion: app.redislabs.com/v1alpha1 +kind: RedisEnterpriseDatabase +metadata: + name: redis-enterprise-database +spec: + evictionPolicy: illegal +EOF ``` You should see this error from the admission controller webhook `redisenterprise.admission.redislabs`. - ```bash - Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu'] - ``` +```sh +Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu'] +``` ## Create a Redis Enterprise database custom resource @@ -214,20 +214,20 @@ The operator uses the instructions in the Redis Enterprise database (REDB) custo This example creates a test database. For production databases, see [create a database]({{< relref "/operate/kubernetes/re-databases/db-controller.md#create-a-database" >}}) and [RedisEnterpriseDatabase API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api" >}}). - ```bash - cat << EOF > /tmp/redis-enterprise-database.yml - apiVersion: app.redislabs.com/v1alpha1 - kind: RedisEnterpriseDatabase - metadata: - name: redis-enterprise-database - spec: - memorySize: 100MB - EOF - ``` + ```sh + cat << EOF > /tmp/redis-enterprise-database.yml + apiVersion: app.redislabs.com/v1alpha1 + kind: RedisEnterpriseDatabase + metadata: + name: redis-enterprise-database + spec: + memorySize: 100MB + EOF + ``` 1. Apply the newly created REDB resource. - ```bash + ```sh oc apply -f /tmp/redis-enterprise-database.yml ``` From 80d2334b2e6710371ed5ed576000274801a2ab18 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Tue, 24 Sep 2024 14:25:53 -0500 Subject: [PATCH 02/11] fix code block spacing in embed --- content/embeds/k8s-admission-webhook-cert.md | 18 +++++++++--------- .../deployment/openshift/openshift-cli.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/content/embeds/k8s-admission-webhook-cert.md b/content/embeds/k8s-admission-webhook-cert.md index e9d2c88fbd..24c4a47050 100644 --- a/content/embeds/k8s-admission-webhook-cert.md +++ b/content/embeds/k8s-admission-webhook-cert.md @@ -27,15 +27,15 @@ 4. Create a patch file for the Kubernetes validating webhook. - ```sh - cat > modified-webhook.yaml < modified-webhook.yaml < modified-webhook.yaml < Date: Wed, 25 Sep 2024 08:54:49 -0500 Subject: [PATCH 03/11] fix spacing on line 113 --- .../kubernetes/deployment/openshift/openshift-cli.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index d18f751579..32671c09ec 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -109,11 +109,11 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi The REC name cannot be changed after cluster creation. - {{}} - Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. - {{}} + {{}} + Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. + {{}} -1. Apply the custom resource file to create your Redis Enterprise cluster. +2. Apply the custom resource file to create your Redis Enterprise cluster. ```sh oc apply -f .yaml @@ -121,7 +121,7 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi The operator typically creates the REC within a few minutes. -1. Check the cluster status. +3. Check the cluster status. ```sh oc get pod From a77505cf33a95c9b8e06f6dc6a8db7ed31b273fd Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 08:58:17 -0500 Subject: [PATCH 04/11] uniform indentation for webhook steps --- content/embeds/k8s-admission-webhook-cert.md | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/content/embeds/k8s-admission-webhook-cert.md b/content/embeds/k8s-admission-webhook-cert.md index 24c4a47050..de940f3fa8 100644 --- a/content/embeds/k8s-admission-webhook-cert.md +++ b/content/embeds/k8s-admission-webhook-cert.md @@ -1,29 +1,29 @@ 1. Verify the `admission-tls` secret exists. - ```sh - kubectl get secret admission-tls - ``` +```sh + kubectl get secret admission-tls +``` - The output should look similar to +The output should look similar to - ``` - NAME TYPE DATA AGE - admission-tls Opaque 2 2m43s - ``` +``` + NAME TYPE DATA AGE + admission-tls Opaque 2 2m43s +``` 2. Save the certificate to a local environment variable. - ```sh - CERT=`kubectl get secret admission-tls -o jsonpath='{.data.cert}'` - ``` +```sh +CERT=`kubectl get secret admission-tls -o jsonpath='{.data.cert}'` +``` 3. Create a Kubernetes validating webhook, replacing `` with the namespace where the REC was installed. - The `webhook.yaml` template can be found in [redis-enterprise-k8s-docs/admission](https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/admission) +The `webhook.yaml` template can be found in [redis-enterprise-k8s-docs/admission](https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/admission) - ```sh - sed 's/OPERATOR_NAMESPACE//g' webhook.yaml | kubectl create -f - - ``` +```sh +sed 's/OPERATOR_NAMESPACE//g' webhook.yaml | kubectl create -f - +``` 4. Create a patch file for the Kubernetes validating webhook. @@ -39,7 +39,7 @@ EOF 5. Patch the webhook with the certificate. - ```sh - kubectl patch ValidatingWebhookConfiguration \ - redis-enterprise-admission --patch "$(cat modified-webhook.yaml)" - ``` +```sh +kubectl patch ValidatingWebhookConfiguration \ + redis-enterprise-admission --patch "$(cat modified-webhook.yaml)" +``` From a9b32ea81fa07f1d98e185197dfa61f1aa02fbcb Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 14:58:33 -0500 Subject: [PATCH 05/11] double indent to fix code block spacing issues --- ...-642-redb-admission-webhook-name-change.md | 12 +-- content/embeds/k8s-admission-webhook-cert.md | 72 +++++++-------- .../kubernetes/active-active/_index.md | 2 - .../deployment/openshift/openshift-cli.md | 87 ++++++++++--------- 4 files changed, 86 insertions(+), 87 deletions(-) diff --git a/content/embeds/k8s-642-redb-admission-webhook-name-change.md b/content/embeds/k8s-642-redb-admission-webhook-name-change.md index d3b07d8e96..ec994bc50a 100644 --- a/content/embeds/k8s-642-redb-admission-webhook-name-change.md +++ b/content/embeds/k8s-642-redb-admission-webhook-name-change.md @@ -2,12 +2,12 @@ 1. Delete the existing `ValidatingWebhookConfiguration` on the Kubernetes cluster (named `redb-admission`). - ```sh - kubectl delete ValidatingWebhookConfiguration redb-admission - ``` + ```sh + kubectl delete ValidatingWebhookConfiguration redb-admission + ``` 1. Apply the resource from the new file. - ```sh - kubectl apply -f deploy/admission/webhook.yaml - ``` \ No newline at end of file + ```sh + kubectl apply -f deploy/admission/webhook.yaml + ``` \ No newline at end of file diff --git a/content/embeds/k8s-admission-webhook-cert.md b/content/embeds/k8s-admission-webhook-cert.md index de940f3fa8..3248c8eb98 100644 --- a/content/embeds/k8s-admission-webhook-cert.md +++ b/content/embeds/k8s-admission-webhook-cert.md @@ -1,45 +1,45 @@ 1. Verify the `admission-tls` secret exists. -```sh - kubectl get secret admission-tls -``` + ```sh + kubectl get secret admission-tls + ``` The output should look similar to -``` - NAME TYPE DATA AGE - admission-tls Opaque 2 2m43s -``` + ```sh + NAME TYPE DATA AGE + admission-tls Opaque 2 2m43s + ``` -2. Save the certificate to a local environment variable. +1. Save the certificate to a local environment variable. -```sh -CERT=`kubectl get secret admission-tls -o jsonpath='{.data.cert}'` -``` + ```sh + CERT=`kubectl get secret admission-tls -o jsonpath='{.data.cert}'` + ``` -3. Create a Kubernetes validating webhook, replacing `` with the namespace where the REC was installed. +1. Create a Kubernetes validating webhook, replacing `` with the namespace where the REC was installed. -The `webhook.yaml` template can be found in [redis-enterprise-k8s-docs/admission](https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/admission) - -```sh -sed 's/OPERATOR_NAMESPACE//g' webhook.yaml | kubectl create -f - -``` - -4. Create a patch file for the Kubernetes validating webhook. - -```sh -cat > modified-webhook.yaml </g' webhook.yaml | kubectl create -f - + ``` + +1. Create a patch file for the Kubernetes validating webhook. + + ```sh + cat > modified-webhook.yaml </` value must be unique for each RERC resource. (RED-96302) * Only global database options are supported, no support for specifying configuration per location. diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index 32671c09ec..3da55ceac9 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -42,7 +42,7 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift 1. Deploy the OpenShift operator bundle. - {{}} If you are using version 6.2.18-41 or earlier, you must [apply the security context constraint](#install-security-context-constraint) before the operator bundle. {{}} + If you are using version 6.2.18-41 or earlier, you must [apply the security context constraint](#install-security-context-constraint) before the operator bundle. ```sh oc apply -f openshift.bundle.yaml @@ -92,12 +92,12 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi system:serviceaccount:: ``` - {{}} If you are using version 6.2.18-41 or earlier, add additional permissions for your cluster. + {{}} If you are using version 6.2.18-41 or earlier, add additional permissions for your cluster. oc adm policy add-scc-to-user redis-enterprise-scc \ system:serviceaccount::redis-enterprise-operator - {{}} + {{}} You can check the name of your project using the `oc project` command. To replace the project name, use `oc edit project myproject`. Replace `rec` with the name of your Redis Enterprise cluster, if different. @@ -109,9 +109,9 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi The REC name cannot be changed after cluster creation. - {{}} - Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. - {{}} + {{}} + Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. + {{}} 2. Apply the custom resource file to create your Redis Enterprise cluster. @@ -119,7 +119,7 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi oc apply -f .yaml ``` - The operator typically creates the REC within a few minutes. + The operator typically creates the REC within a few minutes. 3. Check the cluster status. @@ -127,10 +127,10 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi oc get pod ``` - You should receive a response similar to the following: - + You should receive a response similar to the following: + ```sh - | NAME | READY | STATUS | RESTARTS | AGE | + NAME | READY | STATUS | RESTARTS | AGE | | -------------------------------- | ----- | ------- | -------- | --- | | rec-name-0 | 2/2 | Running | 0 | 1m | | rec-name-1 | 2/2 | Running | 0 | 1m | @@ -149,41 +149,43 @@ If not limited, the webhook intercepts requests from all namespaces. If you have 1. Verify your namespace is labeled and the label is unique to this namespace, as shown in the next example. - ```sh - apiVersion: v1 - kind: Namespace - metadata: - labels: - namespace-name: staging - name: staging - ``` - -2. Patch the webhook spec with the `namespaceSelector` field. - ```sh - cat > modified-webhook.yaml < modified-webhook.yaml <}} - For releases before 6.4.2-4, use this command instead: - ```sh - oc patch ValidatingWebhookConfiguration \ - redb-admission --patch "$(cat modified-webhook.yaml)" - ``` + ```sh + oc patch ValidatingWebhookConfiguration \ + redis-enterprise-admission --patch "$(cat modified-webhook.yaml)" + ``` + + {{}} + For releases before 6.4.2-4, use this command instead: + ```sh + oc patch ValidatingWebhookConfiguration \ + redb-admission --patch "$(cat modified-webhook.yaml)" + ``` - The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). - {{}} + The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). + {{}} ### Verify admission controller installation @@ -212,14 +214,14 @@ The operator uses the instructions in the Redis Enterprise database (REDB) custo 1. Create a `RedisEnterpriseDatabase` custom resource. - This example creates a test database. For production databases, see [create a database]({{< relref "/operate/kubernetes/re-databases/db-controller.md#create-a-database" >}}) and [RedisEnterpriseDatabase API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api" >}}). + This example creates a test database. For production databases, see [create a database]({{< relref "/operate/kubernetes/re-databases/db-controller.md#create-a-database" >}}) and [RedisEnterpriseDatabase API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api" >}}). ```sh cat << EOF > /tmp/redis-enterprise-database.yml apiVersion: app.redislabs.com/v1alpha1 kind: RedisEnterpriseDatabase metadata: - name: redis-enterprise-database + name: redis-enterprise-database spec: memorySize: 100MB EOF @@ -235,4 +237,3 @@ The operator uses the instructions in the Redis Enterprise database (REDB) custo - [Redis Enterprise cluster API]({{}}) - [Redis Enterprise database API]({{}}) - From 2f96ffd2dbcb2727d51597f66423f0bd4cac9ae9 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 15:04:18 -0500 Subject: [PATCH 06/11] consistent indentation --- .../kubernetes/deployment/quick-start.md | 48 ++++++++++--------- .../upgrade/upgrade-redis-cluster.md | 20 ++++---- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/content/operate/kubernetes/deployment/quick-start.md b/content/operate/kubernetes/deployment/quick-start.md index b3cb381e5d..51bec2f806 100644 --- a/content/operate/kubernetes/deployment/quick-start.md +++ b/content/operate/kubernetes/deployment/quick-start.md @@ -19,7 +19,6 @@ To deploy Redis Enterprise Software for Kubernetes and start your Redis Enterpri This guide works with most supported Kubernetes distributions. If you're using OpenShift, see [Redis Enterprise on OpenShift]({{< relref "/operate/kubernetes/deployment/openshift" >}}). For details on what is currently supported, see [supported distributions]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions.md" >}}). - ## Prerequisites To deploy Redis Enterprise for Kubernetes, you'll need: @@ -37,15 +36,15 @@ Throughout this guide, each command is applied to the namespace in which the Red 1. Create a new namespace - ```sh - kubectl create namespace - ``` + ```sh + kubectl create namespace + ``` -2. Change the namespace context to make the newly created namespace default for future commands. +1. Change the namespace context to make the newly created namespace default for future commands. - ```sh - kubectl config set-context --current --namespace= - ``` + ```sh + kubectl config set-context --current --namespace= + ``` You can use an existing namespace as long as it does not contain any existing Redis Enterprise cluster resources. It's best practice to create a new namespace to make sure there are no Redis Enterprise resources that could interfere with the deployment. @@ -115,7 +114,10 @@ that contains cluster specifications. The following example creates a minimal Redis Enterprise cluster. See the [RedisEnterpriseCluster API reference]({{}}) for more information on the various options available. 1. Create a file that defines a Redis Enterprise cluster with three nodes. - {{}} The REC name (`my-rec` in this example) cannot be changed after cluster creation.{{}} + + {{}} + The REC name (`my-rec` in this example) cannot be changed after cluster creation. + {{}} ```sh cat < my-rec.yaml @@ -152,28 +154,28 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis 1. Apply your custom resource file in the same namespace as `my-rec.yaml`. - ```sh - kubectl apply -f my-rec.yaml - ``` + ```sh + kubectl apply -f my-rec.yaml + ``` - You should see a result similar to this: + You should see a result similar to this: - ```sh - redisenterprisecluster.app.redislabs.com/my-rec created - ``` + ```sh + redisenterprisecluster.app.redislabs.com/my-rec created + ``` 1. You can verify the creation of the cluster with: - ```sh - kubectl get rec - ``` + ```sh + kubectl get rec + ``` You should see a result similar to this: - ```sh - NAME AGE - my-rec 1m - ``` + ```sh + NAME AGE + my-rec 1m + ``` At this point, the operator will go through the process of creating various services and pod deployments. diff --git a/content/operate/kubernetes/upgrade/upgrade-redis-cluster.md b/content/operate/kubernetes/upgrade/upgrade-redis-cluster.md index 1d7ee221d4..e95947e35c 100644 --- a/content/operate/kubernetes/upgrade/upgrade-redis-cluster.md +++ b/content/operate/kubernetes/upgrade/upgrade-redis-cluster.md @@ -14,16 +14,16 @@ weight: 10 Redis implements rolling updates for software upgrades in Kubernetes deployments. The upgrade process includes updating three components: 1. [Upgrade the Redis Enterprise operator](#upgrade-the-operator) - 2. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster-rec) - 3. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases) + 1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster-rec) + 1. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases) -## Prerequisite +## Prerequisites 1. Check [Supported Kubernetes distributions]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported. -2. Use `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process. +1. Use `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process. -3. Verify you are upgrading from Redis Enterprise operator version 6.2.10-45 or later. If you are not, you must upgrade to 6.2.10-45 before upgrading to versions 6.2.18 or later. +1. Verify you are upgrading from Redis Enterprise operator version 6.2.10-45 or later. If you are not, you must upgrade to 6.2.10-45 before upgrading to versions 6.2.18 or later. {{}}**Upgrade cluster operating system** If your databases use modules, you need to update all nodes in the cluster to Redis Enterprise 7.2.4 or later before upgrading your operating system. See [Upgrade a cluster's operating system]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-os" >}})in the Redis Enterprise Software documentation for more details.{{}} @@ -96,8 +96,8 @@ redis-enterprise-operator 1/1 1 1 0m36s ``` {{< warning >}} - We recommend upgrading the REC as soon as possible after updating the operator. After the operator upgrade completes, the operator suspends the management of the REC and its associated REDBs, until the REC upgrade completes. - {{< /warning >}} +We recommend upgrading the REC as soon as possible after updating the operator. After the operator upgrade completes, the operator suspends the management of the REC and its associated REDBs, until the REC upgrade completes. +{{< /warning >}} ## Upgrade the Redis Enterprise cluster (REC) @@ -115,8 +115,9 @@ After the operator upgrade is complete, you can upgrade Redis Enterprise cluster ### Upgrade an REC with an Active-Active database -- We recommend upgrading all participating clusters to the same operator version. -- If you are upgrading from a preview version of the Active-Active controller, you can remove the following environment variables: `ACTIVE_ACTIVE_DATABASE_CONTROLLER_ENABLED`, `REMOTE_CLUSTER_CONTROLLER_ENABLED`, and `ENABLE_ALPHA_FEATURES`. +We recommend upgrading all participating clusters to the same operator version. + +If you are upgrading from a preview version of the Active-Active controller, you can remove the following environment variables: `ACTIVE_ACTIVE_DATABASE_CONTROLLER_ENABLED`, `REMOTE_CLUSTER_CONTROLLER_ENABLED`, and `ENABLE_ALPHA_FEATURES`. ### Edit `redisEnterpriseImageSpec` in the REC spec @@ -171,4 +172,3 @@ For more details on how to [upgrade a database]({{< relref "/operate/rs/installi For Active-Active databases, see [Upgrade an Active-Active database]({{}}). Note that if your cluster [`redisUpgradePolicy`]({{< relref "/operate/kubernetes/reference/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}) are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]({{< relref "/operate/rs/installing-upgrading/upgrading#redis-upgrade-policy" >}}) for more details. - From fe4a1a88ee1032cfe1f5a3db69fe2af5f404b2cf Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 15:09:45 -0500 Subject: [PATCH 07/11] embed spacing --- content/embeds/k8s-admission-webhook-cert.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/embeds/k8s-admission-webhook-cert.md b/content/embeds/k8s-admission-webhook-cert.md index 3248c8eb98..f7599ff7bc 100644 --- a/content/embeds/k8s-admission-webhook-cert.md +++ b/content/embeds/k8s-admission-webhook-cert.md @@ -4,10 +4,10 @@ kubectl get secret admission-tls ``` -The output should look similar to + The output should look similar to ```sh - NAME TYPE DATA AGE + NAME TYPE DATA AGE admission-tls Opaque 2 2m43s ``` @@ -18,7 +18,7 @@ The output should look similar to ``` 1. Create a Kubernetes validating webhook, replacing `` with the namespace where the REC was installed. - + The `webhook.yaml` template can be found in [redis-enterprise-k8s-docs/admission](https://github.com/RedisLabs/redis-enterprise-k8s-docs/tree/master/admission) ```sh From 6b6ddbaa0ed7fc14da94f1702bea33ccaa6c1931 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 15:14:55 -0500 Subject: [PATCH 08/11] limit namespace indent --- .../kubernetes/deployment/openshift/openshift-cli.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index 3da55ceac9..3cf3f3c639 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -149,14 +149,14 @@ If not limited, the webhook intercepts requests from all namespaces. If you have 1. Verify your namespace is labeled and the label is unique to this namespace, as shown in the next example. -```sh + ```sh apiVersion: v1 kind: Namespace metadata: labels: - namespace-name: staging + namespace-name: staging name: staging -``` + ``` 1. Patch the webhook spec with the `namespaceSelector` field. From ba544e230ed03bc1791e2c9bef7c71dc9d367a84 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 15:16:01 -0500 Subject: [PATCH 09/11] line 180 note --- .../kubernetes/deployment/openshift/openshift-cli.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index 3cf3f3c639..b71f817cdf 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -179,11 +179,12 @@ If not limited, the webhook intercepts requests from all namespaces. If you have {{}} For releases before 6.4.2-4, use this command instead: - ```sh - oc patch ValidatingWebhookConfiguration \ - redb-admission --patch "$(cat modified-webhook.yaml)" - ``` + ```sh + oc patch ValidatingWebhookConfiguration \ + redb-admission --patch "$(cat modified-webhook.yaml)" + ``` + The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). {{}} From 3da5873f345541e25e1174d43e781e4ba053eb93 Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 16:11:24 -0500 Subject: [PATCH 10/11] final (hopefully) indent fix --- ...-642-redb-admission-webhook-name-change.md | 3 +- content/embeds/k8s-admission-webhook-cert.md | 2 +- .../deployment/openshift/openshift-cli.md | 55 +++++++++-------- .../kubernetes/deployment/quick-start.md | 61 +++++++++---------- 4 files changed, 62 insertions(+), 59 deletions(-) diff --git a/content/embeds/k8s-642-redb-admission-webhook-name-change.md b/content/embeds/k8s-642-redb-admission-webhook-name-change.md index ec994bc50a..5f2e3ba3ff 100644 --- a/content/embeds/k8s-642-redb-admission-webhook-name-change.md +++ b/content/embeds/k8s-642-redb-admission-webhook-name-change.md @@ -10,4 +10,5 @@ ```sh kubectl apply -f deploy/admission/webhook.yaml - ``` \ No newline at end of file + ``` + \ No newline at end of file diff --git a/content/embeds/k8s-admission-webhook-cert.md b/content/embeds/k8s-admission-webhook-cert.md index f7599ff7bc..5b432cee4b 100644 --- a/content/embeds/k8s-admission-webhook-cert.md +++ b/content/embeds/k8s-admission-webhook-cert.md @@ -41,5 +41,5 @@ ```sh kubectl patch ValidatingWebhookConfiguration \ - redis-enterprise-admission --patch "$(cat modified-webhook.yaml)" + redis-enterprise-admission --patch "$(cat modified-webhook.yaml)" ``` diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index b71f817cdf..ff91dbf151 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -39,16 +39,17 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs ``` - 1. Deploy the OpenShift operator bundle. - If you are using version 6.2.18-41 or earlier, you must [apply the security context constraint](#install-security-context-constraint) before the operator bundle. - + If you are using version 6.2.18-41 or earlier, you must [apply the security context constraint](#install-security-context-constraint) before the operator bundle. + ```sh oc apply -f openshift.bundle.yaml ``` - {{< warning >}}Changes to the `openshift.bundle.yaml` file can cause unexpected results.{{< /warning >}} + {{< warning >}} +Changes to the `openshift.bundle.yaml` file can cause unexpected results. + {{< /warning >}} 1. Verify that your `redis-enterprise-operator` deployment is running. @@ -63,7 +64,9 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift redis-enterprise-operator 1/1 1 1 0m36s ``` -{{}}DO NOT modify or delete the StatefulSet created during the deployment process. Doing so could destroy your Redis Enterprise cluster (REC).{{}} + {{}} +DO NOT modify or delete the StatefulSet created during the deployment process. Doing so could destroy your Redis Enterprise cluster (REC). + {{}} ## Install security context constraint @@ -71,7 +74,9 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi 1. Apply the file `scc.yaml` file. - {{}}Do not edit this file. {{}} + {{}} +Do not edit this file. + {{}} ```sh oc apply -f openshift/scc.yaml @@ -92,12 +97,14 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi system:serviceaccount:: ``` - {{}} If you are using version 6.2.18-41 or earlier, add additional permissions for your cluster. - - oc adm policy add-scc-to-user redis-enterprise-scc \ - system:serviceaccount::redis-enterprise-operator + {{}} +If you are using version 6.2.18-41 or earlier, add additional permissions for your cluster. - {{}} +```sh +oc adm policy add-scc-to-user redis-enterprise-scc \ +system:serviceaccount::redis-enterprise-operator +``` +{{}} You can check the name of your project using the `oc project` command. To replace the project name, use `oc edit project myproject`. Replace `rec` with the name of your Redis Enterprise cluster, if different. @@ -110,7 +117,7 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi The REC name cannot be changed after cluster creation. {{}} - Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. +Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are not supported. {{}} 2. Apply the custom resource file to create your Redis Enterprise cluster. @@ -121,13 +128,13 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi The operator typically creates the REC within a few minutes. -3. Check the cluster status. +1. Check the cluster status. ```sh oc get pod ``` - You should receive a response similar to the following: + You should receive a response similar to the following: ```sh NAME | READY | STATUS | RESTARTS | AGE | @@ -158,7 +165,7 @@ If not limited, the webhook intercepts requests from all namespaces. If you have name: staging ``` -1. Patch the webhook spec with the `namespaceSelector` field. +1. Patch the webhook spec with the `namespaceSelector` field. ```sh cat > modified-webhook.yaml <}} - For releases before 6.4.2-4, use this command instead: - - ```sh - oc patch ValidatingWebhookConfiguration \ - redb-admission --patch "$(cat modified-webhook.yaml)" - ``` - - The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). +For releases before 6.4.2-4, use this command instead: + +```sh +oc patch ValidatingWebhookConfiguration \ + redb-admission --patch "$(cat modified-webhook.yaml)" +``` + +The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}). {{}} ### Verify admission controller installation diff --git a/content/operate/kubernetes/deployment/quick-start.md b/content/operate/kubernetes/deployment/quick-start.md index 51bec2f806..c3686b86d5 100644 --- a/content/operate/kubernetes/deployment/quick-start.md +++ b/content/operate/kubernetes/deployment/quick-start.md @@ -23,10 +23,10 @@ This guide works with most supported Kubernetes distributions. If you're using O To deploy Redis Enterprise for Kubernetes, you'll need: -* a Kubernetes cluster in a [supported distribution]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions.md" >}}) -* a minimum of three worker nodes -* a Kubernetes client (kubectl) -* access to DockerHub, RedHat Container Catalog, or a private repository that can hold the required images. +- Kubernetes cluster in a [supported distribution]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions.md" >}}) +- minimum of three worker nodes +- Kubernetes client (kubectl) +- access to DockerHub, RedHat Container Catalog, or a private repository that can hold the required images. ### Create a new namespace @@ -116,7 +116,7 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis 1. Create a file that defines a Redis Enterprise cluster with three nodes. {{}} - The REC name (`my-rec` in this example) cannot be changed after cluster creation. +The REC name (`my-rec` in this example) cannot be changed after cluster creation. {{}} ```sh @@ -130,12 +130,11 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis EOF ``` - This will request a cluster with three Redis Enterprise nodes using the - default requests (i.e., 2 CPUs and 4GB of memory per node). + This will request a cluster with three Redis Enterprise nodes using the default requests (i.e., 2 CPUs and 4GB of memory per node). - To test with a larger configuration, use the example below to add node resources to the `spec` section of your test cluster (`my-rec.yaml`). + To test with a larger configuration, use the example below to add node resources to the `spec` section of your test cluster (`my-rec.yaml`). - ```yaml + ```sh redisEnterpriseNodeResources: limits: cpu: 2000m @@ -146,11 +145,10 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis ``` {{}} - Each cluster must have at least 3 nodes. Single-node RECs are not supported. +Each cluster must have at least 3 nodes. Single-node RECs are not supported. {{}} - See the [Redis Enterprise hardware requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}) for more - information on sizing Redis Enterprise node resource requests. + See the [Redis Enterprise hardware requirements]({{< relref "/operate/rs/installing-upgrading/install/plan-deployment/hardware-requirements.md" >}}) for more information on sizing Redis Enterprise node resource requests. 1. Apply your custom resource file in the same namespace as `my-rec.yaml`. @@ -158,11 +156,11 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis kubectl apply -f my-rec.yaml ``` - You should see a result similar to this: + You should see a result similar to this: - ```sh - redisenterprisecluster.app.redislabs.com/my-rec created - ``` + ```sh + redisenterprisecluster.app.redislabs.com/my-rec created + ``` 1. You can verify the creation of the cluster with: @@ -170,28 +168,26 @@ The following example creates a minimal Redis Enterprise cluster. See the [Redis kubectl get rec ``` - You should see a result similar to this: + You should see a result similar to this: ```sh NAME AGE my-rec 1m ``` - At this point, the operator will go through the process of creating various - services and pod deployments. + At this point, the operator will go through the process of creating various services and pod deployments. - You can track the progress by examining the - StatefulSet associated with the cluster: + You can track the progress by examining the StatefulSet associated with the cluster: - ```sh - kubectl rollout status sts/my-rec - ``` + ```sh + kubectl rollout status sts/my-rec + ``` - or by looking at the status of all of the resources in your namespace: + or by looking at the status of all of the resources in your namespace: - ```sh - kubectl get all - ``` + ```sh + kubectl get all + ``` ## Enable the admission controller @@ -250,15 +246,14 @@ The operator bundle includes a webhook file. The webhook will intercept requests EOF ``` -You should see your request was denied by the `admission webhook "redisenterprise.admission.redislabs"`. + You should see your request was denied by the `admission webhook "redisenterprise.admission.redislabs"`. -```sh -Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu'] -``` + ```sh + Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu'] + ``` ## Create a Redis Enterprise Database (REDB) You can create multiple databases within the same namespace as your REC or in other namespaces. See [manage Redis Enterprise databases for Kubernetes]({{< relref "/operate/kubernetes/re-databases/db-controller.md" >}}) to create a new REDB. - From 46949fb2f685420b357da6df8a9a0ccbacee9dea Mon Sep 17 00:00:00 2001 From: Kaitlyn Michael Date: Wed, 25 Sep 2024 16:17:32 -0500 Subject: [PATCH 11/11] missed one --- .../operate/kubernetes/deployment/openshift/openshift-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/operate/kubernetes/deployment/openshift/openshift-cli.md b/content/operate/kubernetes/deployment/openshift/openshift-cli.md index ff91dbf151..77669946bf 100644 --- a/content/operate/kubernetes/deployment/openshift/openshift-cli.md +++ b/content/operate/kubernetes/deployment/openshift/openshift-cli.md @@ -126,7 +126,7 @@ Each Redis Enterprise cluster requires at least 3 nodes. Single-node RECs are no oc apply -f .yaml ``` - The operator typically creates the REC within a few minutes. + The operator typically creates the REC within a few minutes. 1. Check the cluster status.