This sets up a 3-node ZooKeeper cluster using the official Docker Hub zookeeper:3.8.4 image.
cd /home/kawai/iceberg-poc/iced
docker compose up -d- Node ports:
zookeeper1exposes client port2181on the host. Other nodes are accessible internally on the network. - Cluster peer ports:
2888and3888are used internally for quorum and leader election.
# View logs
docker compose logs -f zookeeper1
# Check ensemble from inside a container
docker compose ps
# Pick the actual container name for zookeeper1 and run:
# docker exec -it <container_name> zkCli.sh -server zookeeper1:2181
# In the shell, try:
# stat / or ls /
# Automated check container (optional)
# Starts a helper that retries zkCli until ZooKeeper is ready
docker compose up -d zk-checker
docker compose logs -f zk-checkerdocker compose down- Each node has a unique
ZOO_MY_IDand the sameZOO_SERVERSlist. - Authentication is disabled (
ALLOW_ANONYMOUS_LOGIN=yes) for simplicity. Enable auth if needed.