Skip to content

Commit 92a2eff

Browse files
Roey Pratamiramm
Roey Prat
andcommitted
5.4.10-8 (#100)
* 5.4.10-8 * Many many many changes to merge the old docs repo with the new auto-generated one. * Update to reflect support for K8s 1.9 and above Co-authored-by: Amiram Mizne <[email protected]>
1 parent c873986 commit 92a2eff

32 files changed

+1316
-233
lines changed

README.md

+101-108
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,146 @@
1+
<!-- omit in toc -->
2+
# Deploying Redis Enterprise K8s using an operator (custom controller)
13

2-
3-
### Deploying Redis Enterprise K8s using an operator (custom controller)
4-
### Table of Contents
5-
6-
4+
* [Documentation](#documentation)
5+
* [Quickstart Guide](#quickstart-guide)
76
* [Prerequisites](#prerequisites)
8-
* [Deployment](#deployment)
7+
* [Basic installation](#basic-installation)
8+
* [OpenShift](#openshift)
99
* [Configuration Options](#configuration)
1010
* [Private Repositories](#private-repositories)
1111
* [Pull Secrets](#pull-secrets)
1212
* [IPV4 enforcement](#ipv4-enforcement)
1313

14+
>Note: Please see the release notes for what's new in the latest release.
1415
15-
#### Prerequisites:
16-
* A minimum of 3 nodes which support the following [requirements][]
17-
* A kubernetes version of 1.8 or higher
18-
* For service broker - a k8s distribution that supports service catalog (see also: [service-catalog][])
19-
* Access to DockerHub, RedHat Container Catalog or a private repository that can serve the required images
20-
> Note: For RHEL based images and/or deployments on OpenShift, please use redis-enterprise-cluster_rhel.yaml and operator_rhel.yaml.
21-
For Service Broker, please see examples/with_service_broker_rhel.yaml. RedHat certified images are available on: https://access.redhat.com/containers/#/product/71f6d1bb3408bd0d
22-
23-
The following are the images and tags for this release:
24-
25-
Redis Enterprise - `redislabs/redis:5.4.6-18` or `redislabs/redis:5.4.6-18.rhel7-openshift`
26-
27-
Operator - `redislabs/operator:5.4.6-1186` or `redislabs/operator:5.4.6-1186b.rhel7`
16+
## Additional Documentation
2817

29-
Services Rigger - `redislabs/k8s-controller:5.4.6-1186` or `redislabs/k8s-controller:5.4.6-1186b.rhel7`
18+
- [Advanced Topics](docs/topics.md)
19+
- [Resource Specification Reference](docs/operator.md)
3020

31-
Service Broker - `redislabs/service-broker:78_4b9b17f` or `redislabs/service-broker:78_4b9b17f.rhel7`
21+
## Quickstart Guide
3222

23+
### Prerequisites
3324

25+
- A minimum of 3 nodes which support the following requirements
26+
- A Kubernetes cluster (server) version of 1.9 or higher
27+
- A Kubernetes client (kubectl) with a matching version. For OpenShift, an OpenShift client (oc).
28+
- For service broker - a k8s distribution that supports service catalog (see also: service-catalog)
29+
- Access to DockerHub, RedHat Container Catalog or a private repository that can serve the required images
3430

35-
#### Deployment:
36-
Clone (or download) this repository, which contains the deployment files:
37-
```
38-
git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs.git
39-
```
40-
41-
1) Create a namespace / project.
31+
For Service Broker, please see examples/with_service_broker_rhel.yaml. RedHat certified images are available on: https://access.redhat.com/containers/#/product/71f6d1bb3408bd0d
4232

43-
For non-OpenShift deployments, create a new namespace:
33+
The following are the images and tags for this release:
4434

45-
```
46-
kubectl create namespace demo
47-
```
35+
Redis Enterprise - `redislabs/redis:5.4.10-22` or `redislabs/redis:5.4.6-22b.rhel7-openshift`
4836

49-
For OpenShift deployments, create a new project (you can substitute `oc` for `kubectl` in the rest of these instructions):
37+
Operator - `redislabs/operator:5.4.10-8` or `redislabs/operator:5.4.6-8.rhel7`
5038

51-
```
52-
oc new-project my-project
53-
```
39+
Services Rigger - `redislabs/k8s-controller:5.4.10-8` or `redislabs/k8s-controller:5.4.10-8b.rhel7`
5440

55-
> For either deployment, switch context to operate within the newly created namespace:
56-
```
57-
kubectl config set-context --current --namespace=demo
58-
```
41+
Service Broker - `redislabs/service-broker:78_4b9b17f` or `redislabs/service-broker:78_4b9b17f.rhel7`
5942

60-
2) If you are not running OpenShift, skip to the next step. For OpenShift, perform the following commands (you need admin permissions for your cluster):
43+
## Basic installation
44+
The "Basic" installations deploys the operator from the current release with the default Ubuntu/Alpine base OS images from DockerHub and default settings.
45+
This is the fastest way to get up and running with a new cluster in most environments.
46+
Other Kubernetes distributions setup process as well as other custom configurations are referenced in this repository.
6147

62-
```
63-
oc apply -f scc.yaml
64-
```
65-
> You should receive the following response:
48+
1. Create a new namespace:
6649

67-
`securitycontextconstraints.security.openshift.io "redis-enterprise-scc" configured`
50+
```bash
51+
kubectl create namespace demo
52+
```
6853

69-
Provide the operator permissions for pods (substitute your project for "my-project"):
70-
```
71-
oc adm policy add-scc-to-group redis-enterprise-scc system:serviceaccounts:my-project
72-
```
54+
Switch context to the newly created namespace:
7355

74-
If you're deploying a service broker, also apply the sb_rbac.yaml file:
75-
```
76-
oc apply -f sb_rbac.yaml
77-
```
56+
```bash
57+
kubectl config set-context --current --namespace=demo
58+
```
7859

79-
> You should receive the following response:
60+
2. To deploy the default installation with `kubectl`, the following command will deploy a bundle of all the yaml declarations required for the operator:
8061

81-
`clusterrole "redis-enterprise-operator-sb" configured`
62+
```bash
63+
kubectl apply -f bundle.yaml
64+
```
8265

83-
Bind the Cluster Service Broker role to the operator service account (in the current namespace):
66+
Alternatively, to run each of the declarations of the bundle individually, run the following commands *instead* of the bundle:
8467

85-
```
86-
oc adm policy add-cluster-role-to-user redis-enterprise-operator-sb --serviceaccount redis-enterprise-operator --rolebinding-name=redis-enterprise-operator-sb
87-
```
88-
> You should receive the following response:
68+
```bash
69+
kubectl apply -f role.yaml
70+
kubectl apply -f role_binding.yaml
71+
kubectl apply -f service_account.yaml
72+
kubectl apply -f crds/app_v1_redisenterprisecluster_crd.yaml
73+
kubectl apply -f operator.yaml
74+
```
75+
> Note: The rbac.yaml file used in previous releases has been broken down into three distinct files:
76+
role.yaml, role_binding.yaml and service_account.yaml.
77+
The crd.yaml file was renamed to redisenterprisecluster_crd.yaml, with the API version prepended to the filename.
8978

90-
`cluster role "redis-enterprise-operator-sb" added: "redis-enterprise-operator"`
79+
3. Run `kubectl get deployment` and verify redis-enterprise-operator deployment is running.
9180

92-
3) You can optionally use pod security policy.
93-
```
94-
kubectl apply -f psp.yaml
95-
```
96-
If you use this option, you should add the policy name to REC configuration, in redis-enterprise-cluster.yaml.
97-
```
98-
podSecurityPolicyName: "redis-enterprise-psp"
99-
```
81+
A typical response may look like this:
10082

83+
```bash
84+
|NAME |DESIRED | CURRENT | UP-TO-DATE | AVAILABLE | AGE|
85+
|-------------------------|-------------------------------------------------|
86+
|redis-enterprise-operator|1 | 1 | 1 | 1 | 2m |
87+
```
10188

102-
4) The next step applies rbac.yaml, creating a service account, role, and role-binding to allow resources access control (provides permissions to create and manage resources):
89+
4. Create A Redis Enterprise Cluster using the default configuration, which is suitable for development type deployments and works in typical scenarios. For more advanced deployment options you may choose the configuration relevant for you - see the index at the top for documentation references that cover many scenarios and the examples in the example folder.
10390

104-
```
105-
kubectl apply -f rbac.yaml
106-
```
91+
```bash
92+
kubectl apply -f crds/app_v1_redisenterprisecluster_cr.yaml
93+
```
10794

108-
> You should receive the following response:
95+
> Note: The redis-enterprise-cluster.yaml file was renamed to redisenterprisecluster_cr.yaml, with the API version prepended to the filename.
10996
110-
`clusterrolebinding.rbac.authorization.k8s.io/redis-enterprise-operator configured`
97+
5. Run ```kubectl get rec``` and verify creation was successful. "rec" is a shortcut for RedisEnterpriseCluster.
98+
A typical response may look like this:
99+
```bash
100+
|NAME |AGE
101+
|redis-enterprise |5m
102+
```
111103

112-
5) The next step applies crd.yaml, creating a CustomResourceDefinition for redis enterprise cluster resource.
113-
This creates another API resource to be handled by the k8s API server and managed by the operator we will deploy next.
114-
```
115-
kubectl apply -f crd.yaml
116-
```
104+
### OpenShift
117105

118-
> You should receive the following response:
106+
The "OpenShift" installations deploys the operator from the current release with the RHEL image from DockerHub and default OpenShift settings.
107+
This is the fastest way to get up and running with a new cluster on OpenShift 3.x.
108+
For OpenShift 4.x, you may choose to use OLM deployment from within your OpenShift cluster or follow the steps below.
109+
Other custom configurations are referenced in this repository.
110+
> Note: you will need to replace `<my-project>` with your project name
119111
120-
`customresourcedefinition.apiextensions.k8s.io/redisenterpriseclusters.app.redislabs.com configured`
112+
1. Create a new project:
121113

122-
6) Create the operator deployment: a deployment responsible for managing the k8s deployment and lifecycle of a redis-enterprise-cluster.
123-
Among many other responsibilities, it creates a stateful set that runs the redis enterprise nodes (as pods).
114+
```bash
115+
oc new-project my-project
116+
```
124117

125-
Before applying, edit the tag according to the relevant operator version: `image: redislabs/operator:tag`
126-
```
127-
kubectl apply -f operator.yaml
128-
```
118+
2. Perform the following commands (you need cluster admin permissions for your Kubernetes cluster):
129119

130-
> You should receive the following response:
120+
```bash
121+
oc apply -f openshift/scc.yaml
122+
```
131123

132-
`deployment.apps/redis-enterprise-operator created`
124+
You should receive the following response:
125+
`securitycontextconstraints.security.openshift.io "redis-enterprise-scc" configured`
133126

134-
7) Run `kubectl get Deployment` and verify redis-enterprise-operator deployment is running.
127+
3. Provide the operator permissions for pods (substitute your project for "my-project"):
135128

136-
A typical response may look like this:
137-
```
138-
|NAME |DESIRED | CURRENT | UP-TO-DATE | AVAILABLE | AGE|
139-
|-------------------------|-------------------------------------------------|
140-
|redis-enterprise-operator|1 | 1 | 1 | 1 | 2m |
141-
```
129+
```bash
130+
oc adm policy add-scc-to-group redis-enterprise-scc system:serviceaccounts:my-project
131+
```
142132

143-
8) Create A Redis Enterprise Cluster. Choose the configuration relevant for you (see next section). There are additional examples in the examples folder. Note that you need to specify an image tag if you'd like to pull a RHEL image.
133+
4. Deploy the OpenShift operator bundle:
144134

145-
```
146-
kubectl apply -f redis-enterprise-cluster.yaml
147-
```
135+
```bash
136+
kubectl apply -f openshift.bundle.yaml
137+
```
148138

149-
9) Run ```kubectl get rec``` and verify creation was successful. "rec" is a shortcut for RedisEnterpriseClusters.
139+
Apply the `RedisEnterpriseCluster` resource with RHEL7 based images
150140

141+
```bash
142+
kubectl apply -f openshift/redis-enterprise-cluster_rhel.yaml
143+
```
151144

152145
#### Configuration:
153146
The operator deploys with default configurations values, but those can be customized:
@@ -157,7 +150,7 @@ Redis Image
157150
redisEnterpriseImageSpec:
158151
imagePullPolicy: IfNotPresent
159152
repository: redislabs/redis
160-
versionTag: 5.4.6-18
153+
versionTag: 5.4.10-22
161154
```
162155
163156
Persistence
@@ -270,21 +263,21 @@ For example:
270263
redisEnterpriseImageSpec:
271264
imagePullPolicy: IfNotPresent
272265
repository: harbor.corp.local/redisenterprise/redis
273-
versionTag: 5.4.6-18
266+
versionTag: 5.4.10-22
274267
```
275268
276269
```yaml
277270
redisEnterpriseServicesRiggerImageSpec:
278271
imagePullPolicy: IfNotPresent
279272
repository: harbor.corp.local/redisenterprise/k8s-controller
280-
versionTag: 5.4.6-1186
273+
versionTag: 5.4.10-8
281274
```
282275
283276
```yaml
284277
bootstrapperImageSpec:
285278
imagePullPolicy: IfNotPresent
286279
repository: harbor.corp.local/redisenterprise/operator
287-
versionTag: 5.4.6-1186
280+
versionTag: 5.4.10-8
288281
```
289282
290283
In Operator Deployment spec (operator.yaml):
@@ -297,7 +290,7 @@ spec:
297290
spec:
298291
containers:
299292
- name: redis-enterprise-operator
300-
image: harbor.corp.local/redisenterprise/operator:5.4.6-1186
293+
image: harbor.corp.local/redisenterprise/operator:5.4.10-8
301294
```
302295
303296
Image specification follow the [K8s Container schema](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#container-v1-core).
File renamed without changes.

0 commit comments

Comments
 (0)