From 8cbd6718fbc4c84f109ee0d94956e16e52be533d Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 08:37:59 +0200 Subject: Prepares for tests to move to separate namespace --- test/00namespace.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/00namespace.yml diff --git a/test/00namespace.yml b/test/00namespace.yml new file mode 100644 index 0000000..fbb6e0e --- /dev/null +++ b/test/00namespace.yml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-kafka -- cgit v1.2.3 From c7eae1b9717dd9b031b3b585ce9a4d518b2fef7d Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 16:20:32 +0200 Subject: Suggests a structure for test cases as single yml --- test/basic-produce-consume.yml | 88 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 test/basic-produce-consume.yml diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml new file mode 100644 index 0000000..37ee807 --- /dev/null +++ b/test/basic-produce-consume.yml @@ -0,0 +1,88 @@ +--- +kind: ConfigMap +metadata: + name: basic-produce-consume + namespace: test-kafka +apiVersion: v1 +data: + + live.sh: |- + exit 0 + + run.sh: |- + echo "Test is up" + exit 0 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: basic-produce-consume + namespace: test-kafka +spec: + template: + spec: + containers: + - name: topic-create + image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce + command: + - ./bin/kafka-topics.sh + - --zookeeper + - zookeeper.kafka.svc.cluster.local:2181 + - --create + - --topic + - test-basic-produce-consume + - --partitions + - "1" + - --replication-factor + - "1" + restartPolicy: Never +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: basic-produce-consume + namespace: test-kafka +spec: + replicas: 1 + template: + metadata: + labels: + test-target: kafka + test-type: readiness + spec: + containers: + - name: kafka + # common test images + #image: solsson/curl@sha256:8b0927b81d10043e70f3e05e33e36fb9b3b0cbfcbccdb9f04fd53f67a270b874 + image: solsson/kafkacat@sha256:1266d140c52cb39bf314b6f22b6d7a01c4c9084781bc779fdfade51214a713a8 + #image: solsson/kubectl-kafkacat@sha256:3715a7ede3f168f677ee6faf311ff6887aff31f660cfeecad5d87b4f18516321 + env: + - name: BOOTSTRAP + value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 + - name: ZOOKEEPER + value: zookeeper.kafka.svc.cluster.local:2181 + # Test set up + command: + - tail + - -f + - /dev/null + # Test run + readinessProbe: + exec: + command: + - /bin/bash + - /test/run.sh + # Test restart on nonzero exit + livenessProbe: + exec: + command: + - /bin/bash + - /test/live.sh + volumeMounts: + - name: config + mountPath: /test + volumes: + - name: config + configMap: + name: basic-produce-consume -- cgit v1.2.3 From 24c43d2119577470790d8e489d76c56e33088e03 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 20:22:59 +0200 Subject: Working boilerplate, with output to kubectl logs --- test/basic-produce-consume.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml index 37ee807..39208e0 100644 --- a/test/basic-produce-consume.yml +++ b/test/basic-produce-consume.yml @@ -6,11 +6,17 @@ metadata: apiVersion: v1 data: - live.sh: |- + setup.sh: |- + touch /tmp/testlog + tail -f /tmp/testlog + + continue.sh: |- exit 0 run.sh: |- - echo "Test is up" + exec >> /tmp/testlog + exec 2>&1 + echo "Test completed at $(date -u +%Y-%m-%dT%H:%M:%SZ)." exit 0 --- @@ -30,6 +36,7 @@ spec: - --zookeeper - zookeeper.kafka.svc.cluster.local:2181 - --create + - --if-not-exists - --topic - test-basic-produce-consume - --partitions @@ -64,21 +71,20 @@ spec: value: zookeeper.kafka.svc.cluster.local:2181 # Test set up command: - - tail - - -f - - /dev/null - # Test run + - /bin/bash + - /test/setup.sh + # Test run, again and again readinessProbe: exec: command: - /bin/bash - /test/run.sh - # Test restart on nonzero exit + # Test quit on nonzero exit livenessProbe: exec: command: - /bin/bash - - /test/live.sh + - /test/continue.sh volumeMounts: - name: config mountPath: /test -- cgit v1.2.3 From c91c42e822228170e0b85ebd2dce041a8894857f Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 20:42:34 +0200 Subject: Implements the actual test --- test/basic-produce-consume.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml index 39208e0..a81cd66 100644 --- a/test/basic-produce-consume.yml +++ b/test/basic-produce-consume.yml @@ -16,7 +16,12 @@ data: run.sh: |- exec >> /tmp/testlog exec 2>&1 - echo "Test completed at $(date -u +%Y-%m-%dT%H:%M:%SZ)." + + unique=$(date -Ins) + + echo "Test $unique" | kafkacat -P -b $BOOTSTRAP -t test-basic-produce-consume -v + kafkacat -C -b $BOOTSTRAP -t test-basic-produce-consume -o -1 -e | grep $unique + exit 0 --- @@ -66,24 +71,28 @@ spec: #image: solsson/kubectl-kafkacat@sha256:3715a7ede3f168f677ee6faf311ff6887aff31f660cfeecad5d87b4f18516321 env: - name: BOOTSTRAP - value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 + #value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 + value: kafka-0.broker.kafka.svc.cluster.local:9092 - name: ZOOKEEPER value: zookeeper.kafka.svc.cluster.local:2181 # Test set up command: - /bin/bash + - -e - /test/setup.sh # Test run, again and again readinessProbe: exec: command: - /bin/bash + - -e - /test/run.sh # Test quit on nonzero exit livenessProbe: exec: command: - /bin/bash + - -e - /test/continue.sh volumeMounts: - name: config -- cgit v1.2.3 From 754fd2f83a7c5e125c81d9d0b9f792427ba8a812 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 20:46:19 +0200 Subject: Introduces the test automation concept as briefly as possible --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 2c747dc..6464906 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,11 @@ That's it. Just add business value :wink:. For clients we tend to use [librdkafka](https://github.com/edenhill/librdkafka)-based drivers like [node-rdkafka](https://github.com/Blizzard/node-rdkafka). To use [Kafka Connect](http://kafka.apache.org/documentation/#connect) and [Kafka Streams](http://kafka.apache.org/documentation/streams/) you may want to take a look at our [sample](https://github.com/solsson/dockerfiles/tree/master/connect-files) [Dockerfile](https://github.com/solsson/dockerfiles/tree/master/streams-logfilter)s. Don't forget the [addon](https://github.com/Yolean/kubernetes-kafka/labels/addon)s. + +# Tests + +``` +kubectl apply -f test/ +# Anything that isn't READY here is a failed test +kubectl -n test-kafka get pods -l test-target=kafka,test-type=readiness -w +``` -- cgit v1.2.3 From 454bea4ba2c82ca2e150d076f2355c1110c22136 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 21:22:10 +0200 Subject: Makes room for a more basic basic test --- test/basic-produce-consume.yml | 103 ----------------------------------------- test/basic-with-kafkacat.yml | 103 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 103 deletions(-) delete mode 100644 test/basic-produce-consume.yml create mode 100644 test/basic-with-kafkacat.yml diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml deleted file mode 100644 index a81cd66..0000000 --- a/test/basic-produce-consume.yml +++ /dev/null @@ -1,103 +0,0 @@ ---- -kind: ConfigMap -metadata: - name: basic-produce-consume - namespace: test-kafka -apiVersion: v1 -data: - - setup.sh: |- - touch /tmp/testlog - tail -f /tmp/testlog - - continue.sh: |- - exit 0 - - run.sh: |- - exec >> /tmp/testlog - exec 2>&1 - - unique=$(date -Ins) - - echo "Test $unique" | kafkacat -P -b $BOOTSTRAP -t test-basic-produce-consume -v - kafkacat -C -b $BOOTSTRAP -t test-basic-produce-consume -o -1 -e | grep $unique - - exit 0 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: basic-produce-consume - namespace: test-kafka -spec: - template: - spec: - containers: - - name: topic-create - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - ./bin/kafka-topics.sh - - --zookeeper - - zookeeper.kafka.svc.cluster.local:2181 - - --create - - --if-not-exists - - --topic - - test-basic-produce-consume - - --partitions - - "1" - - --replication-factor - - "1" - restartPolicy: Never ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: basic-produce-consume - namespace: test-kafka -spec: - replicas: 1 - template: - metadata: - labels: - test-target: kafka - test-type: readiness - spec: - containers: - - name: kafka - # common test images - #image: solsson/curl@sha256:8b0927b81d10043e70f3e05e33e36fb9b3b0cbfcbccdb9f04fd53f67a270b874 - image: solsson/kafkacat@sha256:1266d140c52cb39bf314b6f22b6d7a01c4c9084781bc779fdfade51214a713a8 - #image: solsson/kubectl-kafkacat@sha256:3715a7ede3f168f677ee6faf311ff6887aff31f660cfeecad5d87b4f18516321 - env: - - name: BOOTSTRAP - #value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 - value: kafka-0.broker.kafka.svc.cluster.local:9092 - - name: ZOOKEEPER - value: zookeeper.kafka.svc.cluster.local:2181 - # Test set up - command: - - /bin/bash - - -e - - /test/setup.sh - # Test run, again and again - readinessProbe: - exec: - command: - - /bin/bash - - -e - - /test/run.sh - # Test quit on nonzero exit - livenessProbe: - exec: - command: - - /bin/bash - - -e - - /test/continue.sh - volumeMounts: - - name: config - mountPath: /test - volumes: - - name: config - configMap: - name: basic-produce-consume diff --git a/test/basic-with-kafkacat.yml b/test/basic-with-kafkacat.yml new file mode 100644 index 0000000..a8974e8 --- /dev/null +++ b/test/basic-with-kafkacat.yml @@ -0,0 +1,103 @@ +--- +kind: ConfigMap +metadata: + name: basic-with-kafkacat + namespace: test-kafka +apiVersion: v1 +data: + + setup.sh: |- + touch /tmp/testlog + tail -f /tmp/testlog + + continue.sh: |- + exit 0 + + run.sh: |- + exec >> /tmp/testlog + exec 2>&1 + + unique=$(date -Ins) + + echo "Test $unique" | kafkacat -P -b $BOOTSTRAP -t test-basic-with-kafkacat -v + kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -e | grep $unique + + exit 0 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: basic-with-kafkacat + namespace: test-kafka +spec: + template: + spec: + containers: + - name: topic-create + image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce + command: + - ./bin/kafka-topics.sh + - --zookeeper + - zookeeper.kafka.svc.cluster.local:2181 + - --create + - --if-not-exists + - --topic + - test-basic-with-kafkacat + - --partitions + - "1" + - --replication-factor + - "1" + restartPolicy: Never +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: basic-with-kafkacat + namespace: test-kafka +spec: + replicas: 1 + template: + metadata: + labels: + test-target: kafka + test-type: readiness + spec: + containers: + - name: testcase + # common test images + #image: solsson/curl@sha256:8b0927b81d10043e70f3e05e33e36fb9b3b0cbfcbccdb9f04fd53f67a270b874 + image: solsson/kafkacat@sha256:1266d140c52cb39bf314b6f22b6d7a01c4c9084781bc779fdfade51214a713a8 + #image: solsson/kubectl-kafkacat@sha256:3715a7ede3f168f677ee6faf311ff6887aff31f660cfeecad5d87b4f18516321 + env: + - name: BOOTSTRAP + #value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 + value: kafka-0.broker.kafka.svc.cluster.local:9092 + - name: ZOOKEEPER + value: zookeeper.kafka.svc.cluster.local:2181 + # Test set up + command: + - /bin/bash + - -e + - /test/setup.sh + # Test run, again and again + readinessProbe: + exec: + command: + - /bin/bash + - -e + - /test/run.sh + # Test quit on nonzero exit + livenessProbe: + exec: + command: + - /bin/bash + - -e + - /test/continue.sh + volumeMounts: + - name: config + mountPath: /test + volumes: + - name: config + configMap: + name: basic-with-kafkacat -- cgit v1.2.3 From 48bd7c39af657db1338662cf99b5531aac929d1d Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Fri, 28 Jul 2017 21:23:59 +0200 Subject: Now we're on par with the old tests, but automated --- test/11topic-create-test1.yml | 25 ------------ test/12topic-create-test2.yml | 27 ------------- test/21consumer-test1.yml | 24 ------------ test/31producer-test1.yml | 24 ------------ test/99testclient.yml | 15 ------- test/basic-produce-consume.yml | 89 ++++++++++++++++++++++++++++++++++++++++++ test/test.sh | 34 ---------------- 7 files changed, 89 insertions(+), 149 deletions(-) delete mode 100644 test/11topic-create-test1.yml delete mode 100644 test/12topic-create-test2.yml delete mode 100644 test/21consumer-test1.yml delete mode 100644 test/31producer-test1.yml delete mode 100644 test/99testclient.yml create mode 100644 test/basic-produce-consume.yml delete mode 100644 test/test.sh diff --git a/test/11topic-create-test1.yml b/test/11topic-create-test1.yml deleted file mode 100644 index 321dc57..0000000 --- a/test/11topic-create-test1.yml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: topic-create-test1 - namespace: kafka -spec: - template: - metadata: - name: topic-create-test1 - spec: - containers: - - name: kafka - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - ./bin/kafka-topics.sh - - --zookeeper - - zookeeper:2181 - - --create - - --topic - - test1 - - --partitions - - "1" - - --replication-factor - - "1" - restartPolicy: Never diff --git a/test/12topic-create-test2.yml b/test/12topic-create-test2.yml deleted file mode 100644 index edbe1df..0000000 --- a/test/12topic-create-test2.yml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: topic-create-test2 - namespace: kafka -spec: - template: - metadata: - name: topic-create-test2 - spec: - containers: - - name: kafka - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - ./bin/kafka-topics.sh - - --zookeeper - - zookeeper:2181 - - --create - - --topic - - test2 - - --partitions - - "1" - - --replication-factor - - "3" - - --config - - min.insync.replicas=2 - restartPolicy: Never diff --git a/test/21consumer-test1.yml b/test/21consumer-test1.yml deleted file mode 100644 index 43678f8..0000000 --- a/test/21consumer-test1.yml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: consumer-test1 - namespace: kafka -spec: - replicas: 1 - template: - metadata: - labels: - app: consumer - scope: test - topic: test1 - spec: - containers: - - name: kafka - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - ./bin/kafka-console-consumer.sh - - --bootstrap-server - - kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 - - --topic - - test1 - - --from-beginning diff --git a/test/31producer-test1.yml b/test/31producer-test1.yml deleted file mode 100644 index 354a16a..0000000 --- a/test/31producer-test1.yml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: producer-test1 - namespace: kafka -spec: - template: - metadata: - name: producer-test1 - spec: - containers: - - name: kafka - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - /bin/sh - - -c - - > - echo "test1 $(date)" - | - ./bin/kafka-console-producer.sh - --topic test1 - --broker-list kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 - ; sleep 1 - restartPolicy: Never diff --git a/test/99testclient.yml b/test/99testclient.yml deleted file mode 100644 index a367004..0000000 --- a/test/99testclient.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Kafka image without the service, so you can run ./bin/ stuff -# kubectl exec -ti testclient -- /bin/bash -apiVersion: v1 -kind: Pod -metadata: - name: testclient - namespace: kafka -spec: - containers: - - name: kafka - image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce - command: - - sh - - -c - - "exec tail -f /dev/null" diff --git a/test/basic-produce-consume.yml b/test/basic-produce-consume.yml new file mode 100644 index 0000000..f56a01f --- /dev/null +++ b/test/basic-produce-consume.yml @@ -0,0 +1,89 @@ +--- +kind: ConfigMap +metadata: + name: basic-produce-consume + namespace: test-kafka +apiVersion: v1 +data: + + setup.sh: |- + touch /tmp/testlog + + ./bin/kafka-topics.sh --zookeeper $ZOOKEEPER \ + --create --if-not-exists --topic test-basic-with-kafkacat \ + --partitions 1 --replication-factor 1 + + # Despite the deprecation warning --zookeeper nothing is consumed when using --bootstrap-server + ./bin/kafka-console-consumer.sh --zookeeper $ZOOKEEPER --topic test-basic-produce-consume > /tmp/testconsumed & + + tail -f /tmp/testlog + + continue.sh: |- + exit 0 + + run.sh: |- + exec >> /tmp/testlog + exec 2>&1 + + unique=$(date -Ins) + + echo "Test $unique" | ./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-basic-produce-consume + echo "" + tail -n 1 /tmp/testconsumed | grep $unique + + # How to make this test fail: + #apt-get update && apt-get install -y --no-install-recommends procps + #pkill java + + exit 0 + +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: basic-produce-consume + namespace: test-kafka +spec: + replicas: 1 + template: + metadata: + labels: + test-target: kafka + test-type: readiness + spec: + containers: + - name: testcase + image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce + env: + - name: BOOTSTRAP + value: kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092 + - name: ZOOKEEPER + value: zookeeper.kafka.svc.cluster.local:2181 + # Test set up + command: + - /bin/bash + - -e + - /test/setup.sh + # Test run, again and again + readinessProbe: + exec: + command: + - /bin/bash + - -e + - /test/run.sh + # JVM start is slow, can we keep producer started and restore the default preriod 10s? + periodSeconds: 30 + # Test quit on nonzero exit + livenessProbe: + exec: + command: + - /bin/bash + - -e + - /test/continue.sh + volumeMounts: + - name: config + mountPath: /test + volumes: + - name: config + configMap: + name: basic-produce-consume diff --git a/test/test.sh b/test/test.sh deleted file mode 100644 index bfc4a8f..0000000 --- a/test/test.sh +++ /dev/null @@ -1,34 +0,0 @@ - -# List topics -kubectl exec testclient -- ./bin/kafka-topics.sh --zookeeper zookeeper:2181 --list - -# Create topic -kubectl exec testclient -- ./bin/kafka-topics.sh --zookeeper zookeeper:2181 --topic test1 --create --partitions 1 --replication-factor 1 - -# Set one of your terminals to listen to messages on the test topic -kubectl exec -ti testclient -- ./bin/kafka-console-consumer.sh --zookeeper zookeeper:2181 --topic test1 --from-beginning - -# Go ahead and produce messages -echo "Write a message followed by enter, exit using Ctrl+C" -kubectl exec -ti testclient -- ./bin/kafka-console-producer.sh --broker-list kafka-0.broker.kafka.svc.cluster.local:9092 --topic test1 - -# 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 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=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 \ - --acks=1 --throughput=1 --max-messages=10 -- cgit v1.2.3