Dolphin
Dolphin

Reputation: 38739

replicaof directive not allowed in cluster mode

I am installing redis cluster using helm v3.2.1 via this command :

./helm install stable/redis-ha --generate-name -n middleware

But, when I start the redis cluster, It gives me error :

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 12
>>> 'slaveof 10.111.179.78 6379'
replicaof directive not allowed in cluster mode

Can you help me find the issue and what should I do to make it work?

Some people said to turn cluster-enabled to no but I do not think it is a wise decision.

Upvotes: 1

Views: 4862

Answers (1)

for_stack
for_stack

Reputation: 22936

You should comment slaveof 10.111.179.78 6379.

With Redis Cluster, in order to make a node be a replica of another, you should call the CLUSTER REPLICATE command, NOT specifying the slaveof config.

I'm not familiar with Kubernetes-helm, and not sure if it will automatically call this command. You can remove the slaveof config, and try again.

Upvotes: 1

Related Questions