Deploy Redis Enterprise with OpenShift OperatorHub
OpenShift provides the OperatorHub where you can install the Redis Enterprise operator from the administrator user interface.
You can deploy Redis Enterprise for Kubernetes from the Red Hat OpenShift CLI. You can also use a UI, OperatorHub (Red Hat) to install operators and create custom resources.
To see which version of Redis Enterprise for Kubernetes supports your OpenShift version, see Supported Kubernetes distributions.
Install the Redis Enterprise operator
-
Select Operators > OperatorHub.
-
Search for Redis Enterprise in the search dialog and select the Redis Enterprise Operator provided by Redis marked as Certified.
By default, the image is pulled from Red Hat's registry.
-
On the Install Operator page, specify the namespace for the operator.
Only one namespace per operator is supported.
-
Update the channel with the version you're installing.
For more information about specific versions, see the release notes.
-
Choose an approval strategy.
Use Manual for production systems to ensure the operator is only upgraded by approval.
-
Select Install and approve the install plan.
You can monitor the subscription status in Operators > Installed Operators.
Install security context constraint
The Redis Enterprise pods must run in OpenShift with privileges set in a Security Context Constraint. This grants the pod various rights, such as the ability to change system limits or run as a particular user.
You only need to install the SCC once, but you must not delete it.
-
Select the project you'll be using or create a new project.
-
Download
scc.yaml
. -
Apply the file to install the security context constraint.
oc apply -f scc.yaml
After the install, the OperatorHub automatically uses the constraint for Redis Enterprise node pods.
If you are using the recommended RedisEnterpriseCluster name of rec
, the SCC is automatically bound to the RedisEnterpriseCluster after install.
If you choose a different name for the RedisEnterpriseCluster, or override the default service account name, you must manually bind the SCC to the RedisEnterpriseCluster’s service account:
oc adm policy add-scc-to-user redis-enterprise-scc-v2 \
system:serviceaccount:<my-project>:<rec-service-account-name>
Create Redis Enterprise custom resources
The Installed Operators->Operator details page shows the provided APIs: RedisEnterpriseCluster and RedisEnterpriseDatabase. You can select Create instance to create custom resources using the OperatorHub interface.
Use the YAML view to create a custom resource file or let OperatorHub generate the YAML file for you by specifying your configuration options in the form view.
For more information on creating and maintaining Redis Enterprise custom resources, see Redis Enterprise clusters (REC) and Redis Enterprise databases (REDB).