I am trying to connect my Kafka which is protected by api-key for K6 runs. The original documentation on K6 website doesn’t point on how to connect to Kafka using API KEY. Here is the link for reference: Results output
I have tried following commands but it is like throwing stone in the dark:
k6 run --logformat=raw --out kafka=brokers=<broker-name>,topic=<topic-name>,format=json,api-key=<Api-Key> <file-name>.js
k6 run --logformat=raw --out kafka=brokers=<broker-name>,topic=<topic-name>,format=json,apikey=<Api-Key> <file-name>.js
k6 run --logformat=raw --out kafka=brokers=<broker-name>,topic=<topic-name>,format=json,apiKey=<Api-Key> <file-name>.js
This is the error I am seeing when I run the above statements:
kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
Can someone point me in the right direction to connect to Kafka using some form of authentication during K6 run?