spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.51k stars 359 forks source link

redis stack #599

Closed shahabeshaghi67 closed 1 year ago

shahabeshaghi67 commented 1 year ago

I used Redis stack for the Sentinel and Redis image, and the cluster could not become ready. It seems like Sentinel could not find the master ip and give them to replicas. Is there any issue with that image, or should any settings be set?

carnerito commented 1 year ago

@shahabeshaghi67 I have the same issue, have you solved it?

carnerito commented 1 year ago

Oh, I see. Protected Mode should be disabled if the Redis stack is started without auth. Here you can see how it can be disabled.

lucasleon2107 commented 1 year ago

Hi @carnerito , are you using the Redis Stack image for Redis and Sentinel?

carnerito commented 1 year ago

@lucasleon2107 Yes, this is what my manifests look like:

kind: Secret
metadata:
  name: redis-auth
  namespace: vms
type: Opaque
stringData:
  password: '<password>'
---
apiVersion: databases.spotahome.com/v1
kind: RedisFailover
metadata:
  name: redis-stack
  namespace: vms
spec:
  auth:
    secretPath: redis-auth
  sentinel:
    replicas: 3
    image: 'redis/redis-stack-server:6.2.6-v7'
    command:
      - "redis-server"
      - "/redis/sentinel.conf"
      - "--sentinel"
      - "--protected-mode"
      - "no"
      - "--dir"
      - "/data"
    exporter:
      enabled: true
      image: leominov/redis_sentinel_exporter:1.3.0
  redis:
    resources:
      limits:
        memory: 9Gi
    replicas: 3
    image: 'redis/redis-stack-server:6.2.6-v7'
    command:
      - "redis-server"
      - "/redis/redis.conf"
      - "--protected-mode"
      - "no"
      - "--dir"
      - "/data"
      - "--loadmodule"
      - "/opt/redis-stack/lib/redisearch.so"
      - "--loadmodule"
      - "/opt/redis-stack/lib/rejson.so"
    customConfig:
      - "maxmemory 8gb"
    exporter:
      enabled: true
      image: oliver006/redis_exporter:v1.3.5-alpine
      args:
        - --web.telemetry-path
        - /metrics
      env:
        - name: REDIS_EXPORTER_LOG_FORMAT
          value: txt
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.