Skip to content

Commit

Permalink
K8s Intrepid release (#1733)
Browse files Browse the repository at this point in the history
* update desc and linktitle (#1732)

* DOC-994 Istio ingress configuration (#1734)

* openshift 3 bundle comments

* openshift version changes

* correct external IPs

* DOC-1092 adding Istio section to K8s AA article (#1742)

* adding istio section to AA article

* istio manual CRD warning

* DOC-1091 Intrepid release notes (#1738)

* new version tag, updated known issue

* small line edits, added private repo prereq (#1747)

* Apply suggestions from code review

Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com>

Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com>
  • Loading branch information
kaitlynmichael and rrelledge authored Jan 11, 2022
1 parent 363210a commit 34a8028
Show file tree
Hide file tree
Showing 21 changed files with 400 additions and 88 deletions.
4 changes: 2 additions & 2 deletions content/kubernetes/deployment/openshift/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ To [create a database on an OpenShift 4.x cluster via the OperatorHub]({{< relre

## For OpenShift via the CLI

To [create a database on an OpenShift 4.x cluster via the CLI]({{< relref "openshift-cli.md" >}}) you need:
To [create a database on an OpenShift cluster via the CLI]({{< relref "openshift-cli.md" >}}), you need:

1. An [OpenShift 4.x cluster installed](https://docs.openshift.com/container-platform/4.3/welcome/index.html) with at least three nodes that each meet the [minimum requirements for a development installation]({{< relref "/rs/administering/designing-production/hardware-requirements.md" >}}).
1. An [OpenShift cluster installed](https://docs.openshift.com/container-platform/4.3/welcome/index.html) with at least three nodes that each meet the [minimum requirements for a development installation]({{< relref "/rs/administering/designing-production/hardware-requirements.md" >}}).
1. The [kubectl package installed](https://kubernetes.io/docs/tasks/tools/install-kubectl/) at version 1.9 or higher
1. The [OpenShift cli installed](https://docs.openshift.com/container-platform/4.2/cli_reference/openshift_cli/getting-started-cli.html)
21 changes: 15 additions & 6 deletions content/kubernetes/deployment/openshift/openshift-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ cluster with OpenShift.

## Prerequisites

- [OpenShift cluster](https://docs.openshift.com/container-platform/4.8/installing/index.html) installed at version 4.6 or higher, with at least three nodes (each meeting the [minimum requirements for a development installation]({{< relref "/rs/administering/designing-production/hardware-requirements.md" >}}))
- [OpenShift cluster](https://docs.openshift.com/container-platform/4.8/installing/index.html) installed, with at least three nodes (each meeting the [minimum requirements for a development installation]({{< relref "/rs/administering/designing-production/hardware-requirements.md" >}}))
{{<note>}}
If you are running an OpenShift 3 version, use the `bundle.yaml` file located in the `openshift_3_x` folder in the `redis-enterprise-k8s-docs` repo. This folder also contains the custom resource definitions (CRDs) compatible with OpenShift 3.x.
{{</note>}}
- [kubectl tool](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed at version 1.9 or higher
- [OpenShift CLI](https://docs.openshift.com/container-platform/4.8/cli_reference/openshift_cli/getting-started-cli.html) installed

Expand Down Expand Up @@ -69,15 +72,21 @@ cluster with OpenShift.
oc adm policy add-scc-to-user redis-enterprise-scc system:serviceaccount:<my-project>:rec
```

You can see the name of your project with the `oc project` command to replace `<my-project>` in the command above. Replace `rec` with the name of your Redis Enterprise cluster, if different.
You can see the name of your project with the `oc project` command to replace `<my-project>` in the command above. Replace `rec` with the name of your Redis Enterprise cluster, if different.

1. Deploy the OpenShift operator bundle.

{{< warning >}}Changes to the `openshift.bundle.yaml` file can cause unexpected results.{{< /warning >}}
{{<note>}}
If you are running on OpenShift 3.x, use the `openshift.bundle.yaml` file in the `openshift_3_x` folder.
{{</note>}}

```sh
oc apply -f openshift.bundle.yaml
```
```sh
oc apply -f openshift.bundle.yaml
```

{{< warning >}}
Changes to the `openshift.bundle.yaml` file can cause unexpected results.
{{< /warning >}}

1. Verify that your redis-enterprise-operator deployment is running, run:

Expand Down
76 changes: 42 additions & 34 deletions content/kubernetes/deployment/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,36 @@ If you're running either OpenShift or VMWare Tanzu, we provide specific getting
* [Redis Enterprise on OpenShift]({{< relref "/kubernetes/deployment/openshift/_index.md" >}})
* [Redis Enterprise on VMWare Tanzu]({{< relref "/kubernetes/deployment/tanzu/_index.md" >}})

## Prerequistes
## Prerequisites

To deploy the Redis Enterprise operator, you'll need:

- a Kubernetes cluster in a [supported distribution]({{<relref "content/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.
* a Kubernetes cluster in a [supported distribution]({{<relref "content/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.

See your version's [release notes]({{<relref "/kubernetes/release-notes/_index.md">}}) for a list of required images.

### Namespaces
If you are not pulling images from DockerHub, see [Private Repositories](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/README.md#private-repositories) for additional sections to add to your REC resource file and your `operator.yaml` file.

### Create a new namespace

The Redis Enterprise operator manages a single Redis Enterprise cluster in a single namespace.

Throughout this guide, you should assume that each command is applied to the namespace in
which the Redis Enterprise cluster operates.
Throughout this guide, you should assume that each command is applied to the namespace in which the Redis Enterprise cluster operates.

You can set the default namespace for these operations by running:
1. Create a new namespace

```
kubectl config set-context --current --namespace=my-namespace
```
```sh
kubectl create namespace <my-namespace>
```

2. Change the namespace context to make the newly created namespace default for future commands.

```sh
kubectl config set-context --current --namespace=<my-namespace>
```

## Install the operator

Expand All @@ -66,7 +73,7 @@ or by [using the GitHub API](https://docs.github.com/en/rest/reference/repos#rel

1. Download the bundle for the latest release:

```
```sh
VERSION=`curl --silent https://api.github.com/repos/RedisLabs/redis-enterprise-k8s-docs/releases/latest | grep tag_name | awk -F'"' '{print $4}'`
curl --silent -O https://raw.githubusercontent.com/RedisLabs/redis-enterprise-k8s-docs/$VERSION/bundle.yaml
```
Expand All @@ -75,7 +82,7 @@ If you need a different release, replace `VERSION` in the above with a specific

### Apply the bundle

```
```sh
kubectl apply -f bundle.yaml
```

Expand All @@ -92,7 +99,7 @@ kubectl apply -f bundle.yaml

#### Verify that the operator is running

Check the operator deployment to verify it's running in your namespace:
Check the operator deployment to verify it's running in your namespace:
```sh
kubectl get deployment -l name=redis-enterprise-operator
Expand All @@ -116,7 +123,7 @@ You can test the operator by creating a minimal cluster by following this proced
1. Create a file called `simple-cluster.yaml` that defines a Redis Enterprise cluster with three nodes:
```
```sh
cat <<EOF > simple-cluster.yaml
apiVersion: "app.redislabs.com/v1"
kind: "RedisEnterpriseCluster"
Expand All @@ -132,7 +139,7 @@ You can test the operator by creating a minimal cluster by following this proced
If you want to test with a larger configuration, you can
specify the node resources. For example, this configuration increases the memory:
```
```sh
cat <<EOF > simple-cluster.yaml
apiVersion: "app.redislabs.com/v1"
kind: "RedisEnterpriseCluster"
Expand All @@ -152,50 +159,52 @@ You can test the operator by creating a minimal cluster by following this proced
See the [Redis Enterprise hardware requirements]({{< relref "/rs/administering/designing-production/hardware-requirements.md">}}) for more
information on sizing Redis Enterprise node resource requests.
2. Create the CRD in the namespace with the file `simple-cluster.yaml`:
```
```sh
kubectl apply -f simple-cluster.yaml
```
You should see a result similar to this:
```
```sh
redisenterprisecluster.app.redislabs.com/test-cluster created
```
3. You can verify the creation of the with:
```
```sh
kubectl get rec
```
You should see a result similar to this:
```
```sh
NAME AGE
test-cluster 1m
```
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:
```
```sh
kubectl rollout status sts/test-cluster
```
or by simply looking at the status of all of the resources in your namespace:
```
```sh
kubectl get all
```
<!---ADD Admission Controller and namespace limiting webhook steps here--->
4. Once the cluster is running, you can create a test database. First, define the database with the following YAML file:
```
```sh
cat <<EOF > smalldb.yaml
apiVersion: app.redislabs.com/v1alpha1
kind: RedisEnterpriseDatabase
Expand All @@ -208,21 +217,20 @@ You can test the operator by creating a minimal cluster by following this proced
Next, apply the database:
```
```sh
kubectl apply -f smalldb.yaml
```
5. The connectivity information for the database is now stored in a Kubernetes
secret using the same name but prefixed with `redb-`:
```
```sh
kubectl get secret/redb-smalldb -o yaml
```
From this secret you can get the service name, port, and password for the
default user.
## Operator overview {#overview}
The Redis Enterprise operator uses [custom resource definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) (CRDs) to create and manage Redis Enterprise clusters (REC) and Redis Enterprise databases (REDB).
Expand All @@ -231,11 +239,11 @@ The operator is a deployment that runs within a given namespace. These operator
When the operator is installed, the following resources are created:
* a service account under which the operator will run
* a set of roles to define the privileges necessary for the operator to perform its tasks
* a set of role bindings to authorize the service account for the correct roles (see above)
* the CRD for a Redis Enterprise cluster (REC)
* the CRD for a Redis Enterprise database (REDB)
* the operator itself (a deployment)
* a service account under which the operator will run
* a set of roles to define the privileges necessary for the operator to perform its tasks
* a set of role bindings to authorize the service account for the correct roles (see above)
* the CRD for a Redis Enterprise cluster (REC)
* the CRD for a Redis Enterprise database (REDB)
* the operator itself (a deployment)
The operator currently runs within a single namespace and is scoped to operate only on the Redis Enterprise cluster in that namespace.
11 changes: 10 additions & 1 deletion content/kubernetes/re-clusters/create-aa-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ From inside your K8s cluster, edit your Redis Enterprise cluster (REC) resource

1. Make sure you have DNS aliases for each database that resolve your API hostname `<api-hostname>`,`<ingress-suffix>`, `<replication-hostname>` to the IP address of the ingress controller’s LoadBalancer. To avoid entering multiple DNS records, you can use a wildcard in your alias (such as `*.ijk.redisdemo.com`).

#### If using Istio Gateway and VirtualService

No changes are required to the REC spec if you are using [Istio]({{<relref "/kubernetes/re-databases/ingress_routing_with_istio.md">}}) in place of an ingress controller. The `activeActive` section added above creates ingress resources. The two custom resources used to configure Istio (Gateway and VirtualService) replace the need for ingress resources.

{{<warning>}}
These custom resources are not controlled by the operator and will need to be configured and maintained manually.
{{</warning>}}

For each cluster, verify the VirtualService resource has two `- match:` blocks in the `tls` section. The hostname under `sniHosts:` should match your `<replication-hostname>`.

### Using OpenShift routes

1. Make sure your Redis Enterprise cluster (REC) has a different name (`<rec-name.namespace>`) than any other participating clusters. If not, you'll need to manually rename the REC or move it to a different namespace.
Expand Down Expand Up @@ -162,7 +172,6 @@ From inside your K8s cluster, edit your Redis Enterprise cluster (REC) resource
rec01 api-openshift.apps.abc.redisdemo.com rec01 api passthrough None
```
## Create an Active-Active database with `crdb-cli`
The `crdb-cli` command can be run from any Redis Enterprise pod hosted on any participating K8s cluster. You'll need the values for the [required parameters]({{< relref "/kubernetes/re-clusters/create-aa-database#document-required-parameters" >}}) for each Redis Enterprise cluster.
Expand Down
Loading

0 comments on commit 34a8028

Please sign in to comment.