Skip to content

Commit cbcd078

Browse files
committed
docs: Update getting-started.adoc
1 parent a66761e commit cbcd078

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/ROOT/pages/getting-started.adoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,7 @@ 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
243-
# optional, determine the port
244-
PORT=$(kubectl get pod simple-zk-server-primary-0 -o=jsonpath='{.spec.containers[0].ports[0].containerPort}')
245-
echo $PORT
242+
PORT="$(kubectl get pod simple-zk-server-primary-0 -o=json | jq '.spec.containers[].ports[] | select(.name == "zk") | .containerPort')"
246243
kubectl exec -i -t simple-zk-server-primary-0 -- bin/zkCli.sh -server "localhost:$PORT"
247244
----
248245

0 commit comments

Comments
 (0)