replicaof directive not allowed in cluster mode

6/10/2020

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.

-- Dolphin
kubernetes
kubernetes-helm
redis

1 Answer

6/10/2020

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.

-- for_stack
Source: StackOverflow