Using the Redis Enterprise Operator for Kubernetes it is very easy to install, configure a cluster, and create Redis databases.
To create a database with modules you can use the following YAML:
apiVersion: app.redislabs.com/v1alpha1
kind: RedisEnterpriseDatabase
metadata:
name: movie-database
spec:
modulesList:
- name: graph
version: 2.0.19
- name: search
version: 2.0.0
memorySize: 200MB
persistence: aofEverySecond
replication: true
redisEnterpriseCluster:
name: redis-enterprise
The modulesList
entry lists the modules to activate for the database you are creating.
The list of available modules for your current installation is available in the cluster itself, my cluster is named RedisEnterpriseCluster
, and I can retrieve the list of available modules and versions using the following command:
> kubectl get RedisEnterpriseCluster -o jsonpath={..modules}
[{"displayName":"RedisJSON","name":"ReJSON","versions":["1.0.4"]},{"displayName":"RedisBloom","name":"bf","versions":["2.2.4"]},{"displayName":"redisearch-enterprise","name":"ft","versions":["1.6.14"]},{"displayName":"RedisGraph","name":"graph","versions":["2.0.19"]},{"displayName":"RediSearch 2","name":"search","versions":["2.0.0"]},{"displayName":"RedisTimeSeries","name":"timeseries","versions":["1.2.7"]}]
You just need to use the name
and version
in your database definition.
Regards
Tug