aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2016-09-06 06:21:55 +0200
committerStaffan Olsson <staffan@repos.se>2016-09-06 06:21:55 +0200
commitcfdf2756f162c469985ed0097ae205be99d91349 (patch)
tree8c1b24a5da5de8b625dd8cf606dc370d4a4dcc04
parenta8ec98d736648a21952cac1c6591d1aeabbc008e (diff)
downloadkubernetes-kafka-cfdf2756f162c469985ed0097ae205be99d91349.tar.gz
kubernetes-kafka-cfdf2756f162c469985ed0097ae205be99d91349.tar.bz2
kubernetes-kafka-cfdf2756f162c469985ed0097ae205be99d91349.zip
Clarifies commands around the second test topic, and what a topic name typo leads to
-rw-r--r--test/test.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/test.sh b/test/test.sh
index 244580e..bfc4a8f 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -1,7 +1,4 @@
-# Run ls ./bin here to see the toolbox
-kubectl exec -ti testclient -- /bin/bash
-
# List topics
kubectl exec testclient -- ./bin/kafka-topics.sh --zookeeper zookeeper:2181 --list
@@ -18,13 +15,19 @@ kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kaf
# Bootstrap even if two nodes are down (shorter name requires same namespace)
kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kafka-0.broker:9092,kafka-1.broker:9092,kafka-2.broker:9092 --topic test1
+# The following commands run in the pod
+kubectl exec -ti testclient -- /bin/bash
+
# Topic 2, replicated
-./bin/kafka-topics.sh --zookeeper zookeeper:2181 --describe --topic topic2
+./bin/kafka-topics.sh --zookeeper zookeeper:2181 --describe --topic test2
./bin/kafka-verifiable-consumer.sh \
--broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
- --topic=topic2 --group-id=A --verbose
+ --topic=test2 --group-id=A --verbose
+# If a topic isn't available this producer will tell you
+# WARN Error while fetching metadata with correlation id X : {topicname=LEADER_NOT_AVAILABLE}
+# ... but with current config Kafka will auto-create the topic
./bin/kafka-verifiable-producer.sh \
--broker-list=kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092 \
--value-prefix=1 --topic=test2 \