We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a66761e commit cbcd078Copy full SHA for cbcd078
modules/ROOT/pages/getting-started.adoc
@@ -239,10 +239,7 @@ We can test ZooKeeper by running the ZooKeeper CLI shell. The easiest way to do
239
240
[source,bash]
241
----
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
+PORT="$(kubectl get pod simple-zk-server-primary-0 -o=json | jq '.spec.containers[].ports[] | select(.name == "zk") | .containerPort')"
246
kubectl exec -i -t simple-zk-server-primary-0 -- bin/zkCli.sh -server "localhost:$PORT"
247
248
0 commit comments