Deploy production-grade Apache ZooKeeper ensembles in minutes. Leader election, ZAB consensus, role-aware routing, and full Day-2 operations.
Data Loss on Failover (RPO)
High Availability Target
Open Source
Deploy ZooKeeper in 4 steps
Install KubeBlocks
# Add Helm repo helm repo add kubeblocks https://apecloud.github.io/helm-charts helm repo update # Install KubeBlocks helm install kubeblocks kubeblocks/kubeblocks \ --namespace kb-system --create-namespace
Install ZooKeeper Addon
helm upgrade -i kb-addon-zookeeper kubeblocks/zookeeper \ -n kb-system
Create a ZooKeeper Ensemble
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: zookeeper-cluster
namespace: demo
spec:
terminationPolicy: Delete
componentSpecs:
- name: zookeeper
componentDef: zookeeper
serviceVersion: "3.9.4"
replicas: 3Ensemble is Ready
$ kubectl get cluster zookeeper-cluster -n demo NAME CLUSTER-DEF STATUS AGE zookeeper-cluster Running 2m
Trusted by Engineering Teams at Scale
Every ensemble runs the ZooKeeper Atomic Broadcast protocol for strict ordering guarantees. KubeBlocks provides separate services for leader-only writes and all-node reads.
zk-cluster-zookeeper:2181zk-cluster-zookeeper-readable:2181kubeblocks.io/role=leaderLeader-Only Write Service
The <cluster>-zookeeper ClusterIP service uses roleSelector to route all writes to the current leader. When the leader changes, Kubernetes endpoint controller automatically updates the service endpoints — no client reconfiguration needed.
All-Node Read Service
The <cluster>-zookeeper-readable ClusterIP service routes reads across all ensemble members, distributing load and maximizing read throughput for read-heavy workloads.
ZAB Protocol
ZooKeeper Atomic Broadcast ensures all updates are totally ordered across the ensemble. A majority quorum must acknowledge each write before it is committed — 3 nodes tolerate 1 failure, 5 nodes tolerate 2.
| Feature | KubeBlocks | Bitnami Helm Chart | Pravega ZK Operator |
|---|---|---|---|
| Kubernetes-native CRD API | ✓ | ✗ | ✓ |
| Automatic leader failover detection | ✓ | ~ | ✓ |
| Quorum-safe horizontal scaling | ✓ | ✗ | ✓ |
| Vertical scaling (CPU/memory) | ✓ | ✗ | ~ |
| PVC volume expansion | ✓ | ✗ | ✗ |
| Role-aware service routing | ✓ | ~ | ~ |
| Dynamic parameter reconfiguration | ✓ | ✗ | ✗ |
| Minor version upgrade (rolling) | ✓ | ~ | ✓ |
| Backup & restore (zoocreeper) | ✓ | ✗ | ✗ |
| Prometheus metrics | ✓ | ✓ | ~ |
| Stop / start cluster | ✓ | ✗ | ✗ |
| Open Source | ✓ | ✓ | ✓ |
| Web management UI | Enterprise | ✗ | ✗ |
✓ = Supported · ~ = Partial / Limited · ✗ = Not supported
Enterpriseindicates a capability available in KubeBlocks Enterprise, not the open-source distribution. Contact us for licensing →
Based on publicly available documentation. Features may vary by version.
KubeBlocks automates the hardest parts of running ZooKeeper on Kubernetes — so your team doesn't have to.
No SSH into pods, no shell scripts. Submit an OpsRequest and KubeBlocks handles the rest.
High Availability & Scaling
Horizontal Scaling
Add or remove ensemble members online. KubeBlocks ensures quorum safety — never scale below 3 nodes on an active ensemble.
Vertical Scaling
Resize CPU and memory on running pods with a rolling update that preserves quorum throughout.
Volume Expansion
Expand data and snapshot-log PVCs without pod restarts on supported storage classes.
Rolling Restart
Controlled pod restarts with quorum-aware sequencing to keep the ensemble available.
Stop / Start
Suspend the ensemble to eliminate compute cost; resume with full state and leader election.
Configuration, Observability & Backup
Dynamic Configuration
Tune ZooKeeper parameters via OpsRequest — tickTime, maxClientCnxns, syncLimit — without full pod restarts.
Minor Version Upgrade
Rolling upgrades across ZooKeeper 3.4 through 3.9 minor versions with health and quorum checks.
Prometheus Metrics
Per-node metrics exposed on port 7000 via the built-in metrics provider; compatible with Prometheus and Grafana.
Admin API
ZooKeeper Admin Server accessible on port 8080 for ruok checks, stat, and mntr commands.
Backup & Restore
Snapshot-based backup via zoocreeper; restore to a new ensemble from any stored snapshot.
Also on KubeBlocks
ZooKeeper is the external coordination layer for Apache Kafka 2.x. KubeBlocks manages both — deploy your Kafka cluster and ZooKeeper ensemble with a single operator and unified Day-2 operations.
Open source and production-ready. Enterprise customers get dedicated onboarding, migration support, and SLA guarantees.