// Module included in the following assemblies:
//
// assembly-zookeeper-node-configuration.adoc

[id='proc-connnecting-to-zookeeper-{context}']
= Connecting to ZooKeeper from a terminal
Open a terminal inside a Kafka container to use Kafka CLI tools that require a ZooKeeper connection.

.Prerequisites

* A Kubernetes cluster is available.
* A kafka cluster is running.
* The Cluster Operator is running.

.Procedure

. Open the terminal using the Kubernetes console or run the `exec` command from your CLI.
+
For example:
+
[source,shell,subs="+quotes,attributes"]
----
kubectl exec -it _my-cluster_-kafka-0 -- bin/kafka-topics.sh --list --zookeeper localhost:2181
----
+
Be sure to use `localhost:2181`.
+
You can now run Kafka commands to ZooKeeper.
