6

Background Currently, I am deploying a redis container using the [redislabs/redismod] (https://hub.docker.com/r/redislabs/redismod) image in the same pod as the application (nodejs). We are utilizing the RediSearch and RedisJSON modules to access redis cache. I am now planning to move this cache to its own pod, so that we have a single cache server serving the application hosted in multiple pods behind a load balancer.

Problem I would like to use Bitnami Helm chart to deploy a Redis Stack server. However, Bitnami only supports Redis OSS and not Redis Stack, which includes the redis modules that we need. So, the question is has anyone figured out a way to deploy Redis Stack server using a Helm chart?

Possible solution I found this nice medium article which seems like a potential workaround to what I am looking for but wanted to see if someone has tried this our already and if this solution would be OK for production use.

1 Answer 1

0

Sure thing; the following works with the 19.5.0 version of the bitnami/redis Helm chart. Make the following changes to your values.yaml.

image:
  repository: redis/redis-stack-server
  tag: 7.2.0-v10
replica:
  command:
    - "/opt/redis-stack/bin/redis-server"
    - "--loadmodule"
    - "/opt/redis-stack/lib/redisearch.so"
    - "MAXSEARCHRESULTS"
    - "10000"
    - "MAXAGGREGATERESULTS"
    - "10000"
    - "--loadmodule"
    - "/opt/redis-stack/lib/rejson.so"

The full Flux HelmRelease that we use for development purposes are as follows:

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: redis-1
  namespace: development
spec:
  chart:
    spec:
      chart: redis
      sourceRef:
        kind: HelmRepository
        name: bitnami
        namespace: system
      version: 19.5.0
  interval: 1m0s
  install:
    replace: true
    remediation:
      retries: -1
    disableWait: true
    disableWaitForJobs: true
  upgrade:
    force: true
    remediation:
      retries: -1
    disableWait: true
    disableWaitForJobs: true
  values:
    image:
      repository: redis/redis-stack-server
      tag: 7.2.0-v10
    master:
      persistence:
        enabled: true
        size: 50Gi
        storageClass: ceph-volatile
    replica:
      replicaCount: 3
      command:
        - "/opt/redis-stack/bin/redis-server"
        - "--loadmodule"
        - "/opt/redis-stack/lib/redisearch.so"
        - "MAXSEARCHRESULTS"
        - "10000"
        - "MAXAGGREGATERESULTS"
        - "10000"
        - "--loadmodule"
        - "/opt/redis-stack/lib/rejson.so"
      persistence:
        enabled: true
        size: 50Gi
        storageClass: ceph-volatile
    sentinel:
      # This will disable the master and replicas services and
      # create a single Redis service exposing both the Redis and Sentinel ports.
      enabled: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.