#!/bin/sh

NODES=`redis-cli -h 172.23.0.11 -p 6379 -a foobared --tls --cacert tls/ca.crt cluster nodes | cut -f2 -d' '`

IFS="
"

for node in $NODES; do
	echo Flushing node $node...
	redis-cli -h ${node%:*} -p ${node##*:} -a foobared --tls --cacert tls/ca.crt flushall
done
