Refactor Zookeeper to avoid hardcoding fixed number of deployments/services
Opened this issue · 2 comments
ramhiser commented
Currently, our Zookeeper implementation uses 3 fixed Deployments
and 3 corresponding fixed Services
.
PetSets look like a promising direction to avoid hardcoding the nodes because they offer:
- a stable hostname, available in DNS
- an ordinal index
- stable storage: linked to the ordinal & hostname
Zookeeper is even mentioned in the PetSet docs. There's even a zookeeper example in kubernetes/contrib
.
ramhiser commented
On the Kubernetes blog, there's a good example of using PetSets
to deploy a 1000-node Cassandra cluster.
adrianmkng commented
I'm looking into using StatefulSets for managing this, hope to create a PR for this once I've figured it out.