Skip to content

Commit fc0a85c

Browse files
csautterTechassi
andauthored
Update getting-started.adoc - set zookeeper cli port (#732)
* Update getting-started.adoc * Update modules/ROOT/pages/getting-started.adoc Co-authored-by: Techassi <git@techassi.dev> * Update modules/ROOT/pages/getting-started.adoc Co-authored-by: Techassi <git@techassi.dev> * docs: Update getting-started.adoc --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent 125edb3 commit fc0a85c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/ROOT/pages/getting-started.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ We can test ZooKeeper by running the ZooKeeper CLI shell. The easiest way to do
239239

240240
[source,bash]
241241
----
242-
kubectl exec -i -t simple-zk-server-primary-0 -- bin/zkCli.sh
242+
PORT="$(kubectl get pod simple-zk-server-primary-0 -o=json | jq '.spec.containers[].ports[] | select(.name == "zk") | .containerPort')"
243+
kubectl exec -i -t simple-zk-server-primary-0 -- bin/zkCli.sh -server "localhost:$PORT"
243244
----
244245

245246
The shell should connect automatically to the ZooKeeper server running on the pod. You can run the `ls /` command to see the list of znodes in the root path, which should include those created by Apache Kafka and Apache NiFi.

0 commit comments

Comments
 (0)