Getting started
To get started with creating ZooKeeper clusters in your project namespace, you first need to deploy the ZooKeeper operator in the workspace where the project exists.
After you deploy the ZooKeeper operator, you can create ZooKeeper Clusters by applying a ZookeeperCluster
custom resource on each attached cluster in a project’s namespace.
A Helm chart exists in the ZooKeeper operator repository that can assist with deploying ZooKeeper clusters.
Example deployment
Follow these steps to deploy a ZooKeeper cluster in a project namespace. This procedure results in a running ZooKeeper cluster, ready for use in your project’s namespace.
-
Set the
PROJECT_NAMESPACE
environment variable to the name of your project’s namespace:export PROJECT_NAMESPACE=<project namespace>
-
Create a ZooKeeper Cluster custom resource in your project namespace
kubectl apply -f - <<EOF apiVersion: zookeeper.pravega.io/v1beta1 kind: ZookeeperCluster metadata: name: zookeeper namespace: ${PROJECT_NAMESPACE} spec: replicas: 1 EOF
-
Check the status of your ZooKeeper cluster using
kubectl
:kubectl get zk -n ${PROJECT_NAMESPACE}
NAME REPLICAS READY REPLICAS VERSION DESIRED VERSION INTERNAL ENDPOINT EXTERNAL ENDPOINT AGE zookeeper 3 3 0.2.13 0.2.13 10.100.200.18:2181 N/A 94s
Deleting ZooKeeper clusters
Follow these steps to delete the Zookeeper clusters.
-
View
ZookeeperClusters
in all namespaces:kubectl get zookeeperclusters -A
-
Delete a specific
ZookeeperCluster
:kubectl -n ${PROJECT_NAMESPACE} delete zookeepercluster <name of zookeepercluster>