Skip to main content
Skip table of contents

Zookeeper in a Project

Deploying ZooKeeper in a project

Get 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

If you need to manage these custom resources across all clusters in a project, it is recommended you use Project Deployments which enables you to leverage GitOps to deploy the resources. Otherwise, you will need to create the resources manually in each cluster.

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.

  1. Set the PROJECT_NAMESPACE environment variable to the name of your project’s namespace:

    CODE
    export PROJECT_NAMESPACE=<project namespace>
  2. Create a ZooKeeper Cluster custom resource in your project namespace

    CODE
    kubectl apply -f - <<EOF
    apiVersion: zookeeper.pravega.io/v1beta1
    kind: ZookeeperCluster
    metadata:
      name: zookeeper
      namespace: ${PROJECT_NAMESPACE}
    spec:
      replicas: 1
    EOF
  3. Check the status of your ZooKeeper cluster using kubectl:

    CODE
    kubectl get zookeeperclusters -n ${PROJECT_NAMESPACE}

    CODE
    NAME        REPLICAS   READY REPLICAS    VERSION   DESIRED VERSION   INTERNAL ENDPOINT    EXTERNAL ENDPOINT   AGE
    zookeeper   1          1                 0.2.13    0.2.13            10.100.200.18:2181   N/A                 94s

Delete ZooKeeper clusters

Follow these steps to delete the Zookeeper clusters.

  1. View ZookeeperClusters in all namespaces:

    CODE
    kubectl get zookeeperclusters -A
  2. Delete a specific ZookeeperCluster:

    CODE
    kubectl -n ${PROJECT_NAMESPACE} delete zookeepercluster <name of zookeepercluster>

Resources

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.