zkCli.sh is a utility to connect to a local or remote ZooKeeper service and execute some commands. This article describes how zkCli.sh can be used to connect to clusters in Instaclustr. In this article, we assume that your cluster has been set up and provisioned properly as shown in our previous tutorial “Creating a Cluster”.
Table of Contents
You also need ZooKeeper binaries which can be downloaded from https://zookeeper.apache.org/releases.html. We recommend a matching ZooKeeper binaries version with your ZooKeeper cluster. You don’t have to install after downloading and extracting.
The public IP address of your machine must be added to the ZooKeeper Allowed Addresses under Firewall Rules in the navigation menu of your cluster in the Instaclustr console. (Refer this support article).
Username, password and certificate file can be found on the Connection Info page of your cluster. Certificate files are required to connect to your cluster with SSL.
Apache ZooKeeper does not enforce authentication. Users can always connect to ZooKeeper servers as a “world” user. However, access to the data (znodes) can be limited by ACL that are associated with an authenticated user. We provide a default user that you can opt to use when connecting to the ZooKeeper servers. If you decide to do so, create a file containing the credential (e.g., jaas.conf) with the following content: