We have deployed the Redis-stack-server cluster in Kubernetes. We are able to create DB (mean add DB in Redis-insight) for Redis-stack-server cluster for one master node but when we increase the master nodes (more than one) than we are not able to create DB
I have provided the basic config details please let me know if yo need any specific info
config.yaml
requirepass password
masterauth password
cluster-enabled yes
cluster-require-full-coverage no
cluster-node-timeout 15000
cluster-config-file /data/nodes.conf
cluster-migration-barrier 1
appendonly yes
dir /var/lib/redis/data
protected-mode no
Service.yaml
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 6379
targetPort: 6379
name: client
- port: 16379
targetPort: 16379
name: gossip
Stateful.yaml
spec:
containers:
- name: redis
image: redis/redis-stack-server:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 6379
name: client
- containerPort: 16379
name: gossip
command: ["/usr/local/etc/redis/update-node.sh", "redis-server", "/usr/local/etc/redis/redis.conf"]
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
volumeMounts:
- name: configmap-redis-cache
mountPath: /usr/local/etc/redis/
#mountPath: /conf
readOnly: false
- name: data
mountPath: /data
readOnly: false
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
capabilities:
drop:
- KILL
- MKNOD
- SYS_CHROOT
resources:
limits:
cpu: '1'
memory: 2Gi
requests:
cpu: '1'
memory: 2Gi
livenessProbe:
tcpSocket:
port: redis
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 5
failureThreshold: 5
successThreshold: 1
readinessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 20
timeoutSeconds: 5
periodSeconds: 3
volumes:
- name: configmap-redis-cache
configMap:
name: configmap-redis-cache
defaultMode: 0755
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "nas-thin"
resources:
requests:
storage: 200Mi
Docker File
FROM docker.repo1.uhc.com/redis/redis-stack-server:latest
RUN mkdir -p /var/lib/redis/data && chown -R 1001:1001 /var/lib/redis/data && chmod -R 777 /var/lib/redis/data
USER 999