Not able to complete redis island in game of pods

Hi guys, so I ran into an issue where the last step in the redis islands in the game of pods, where I had to run a command provided by the rancher doc to finish setup the cluster on the deployed statefulset.

There are always an error message telling me that there is a wrong number of arguments for the option --cluster, thus I can not finish this game.

Has anyone else also ran into the same issue? The step I was talking about is this one command you run in the end to actually deploy the cluster:

kubectl exec -it redis-cluster-0 -- redis-cli --cluster create --cluster-replicas 1 $(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')

In my case, I needed to use this command:

kubectl exec -it redis-cluster-0 – redis-cli --cluster create --cluster-replicas 1 $(kubectl get pods -l app=redis -o jsonpath=’{range.items[*]}{.status.podIP}:6379 ')

note that kubectl get pods -l app=redis is different than what is offered in the game. In the game app=redis-cluster which in my case was incorrect. I used 'kubectl describe pods ’ to see what app was being reported as in use.

Good luck.

Try running the below command on the master node and see what the output is
kubectl get pods -l app=redis-cluster

It should ideally return the pods created from the statefulset. If not you won’t find any resource to be used as part of the redis-cluster.

If so, try running this command (assuming, the app name is defined as redis in the statefulset) on the master node
kubectl get pods -l app=redis

If the above returns the pods created, then use the below command to create the cluster of those 6 pods.
kubectl exec -it redis-cluster-0 – redis-cli --cluster create --cluster-replicas 1 $(kubectl get pods -l app=redis -o jsonpath=’{range.items[*]}{.status.podIP}:6379 ')