SystemCraftsman / strimzi-kafka-cli

Command Line Interface for the Strimzi Kafka Operator
Apache License 2.0
78 stars 13 forks source link

How to mention the bootstrap server details ? #120

Open sunilvishvakarma opened 1 month ago

sunilvishvakarma commented 1 month ago

Hello, Regarding the strimzi-kafka-cli, how can we specify the bootstrap server details when using the kfk console-producer command? When I try: kfk console-producer --topic my-topic -n strimzi-kafka -c interconnect

I get the error: Error from server (NotFound): pods "interconnect-kafka-0" not found

The broker name is actually interconnect-broker-0

Since I am using Ingress, I need to specify the bootstrap server details.

and if you take a look here, they have mentioned the KafkaNodePool name as broker, not the kafka (If I make it kafka, the pods are not coming up)

so, the broker nodes are going to come up with name interconnect-broker-0

mabulgu commented 1 month ago

Hi @sunilvishvakarma. Currently, we assume that the service names are defined as [kafka_cluster_name]-kafka-0 but yeah we need to consider any case that the service name is custom or the case you use kafka node pool which is fairly a new feature.

Let me work on this a little bit so that I believe we can add a new param like --bootstrap.server or similar.

Thanks for pointing out this issue!

sunilvishvakarma commented 1 month ago

@mabulgu, Thank you for your response and for considering my enhancement request.

currently do we have any way to override the [kafka_cluster_name]-kafka-0 value?

mabulgu commented 1 month ago

@mabulgu, Thank you for your response and for considering my enhancement request.

currently do we have any way to override the [kafka_cluster_name]-kafka-0 value?

@sunilvishvakarma unfortunately there is not. We need code changes for it.