-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for .sh
kafka commands in the PATH
#18
Comments
Thanks for opening this issue, @solarmosaic-kflorence. I'll add support for this and associated documentation. :-) |
Great, I will try that out tomorrow @devshawn. |
It works, thanks! Note for future users that in my use-case (kafka deployed to local Kubernetes via version: 1
enable:
history: true
save_on_exit: true
auto_complete: true
auto_suggest: true
inline_help: true
fuzzy_search: true
cluster: local
clusters:
local:
bootstrap_servers: kafka1:19092
zookeeper_connect: zookeeper1:2181
ksql_server_url: http://ksql-server:8088
command_file_extension: sh
command_prefix: kubectl exec svc/kafka1 -- And here is the corresponding docker stack configuration file ( version: '3.3'
services:
# https://hub.docker.com/r/bitnami/zookeeper
zookeeper1:
image: bitnami/zookeeper:3.4.13
hostname: zookeeper1
ports:
- "2181:2181"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
volumes:
- zookeeper1-data:/bitnami/zookeeper
# https://hub.docker.com/r/bitnami/kafka
kafka1:
image: bitnami/kafka:2.2.1
hostname: kafka1
ports:
- "9092:9092"
environment:
ALLOW_ANONYMOUS_LOGIN: "yes"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_CFG_LISTENERS: INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: "zookeeper1:2181"
volumes:
- kafka1-data:/bitnami/kafka which can be deployed like so: Hopefully this saves someone some time. |
Happy to hear it is working! |
Is your feature request related to a problem? Please describe.
See discussion in #15
Describe the solution you'd like
Using
kafka-shell
with a docker image that uses.sh
commands (e.g.kafka-topics.sh
instead of just `kafka-topics, which seems to be the default behavior provided by Apache Kafka) should not result in an error:Some known images that result in this problem:
Additional context
Note that with this fix in place, running commands against docker deployed kafka should work with the following additional configuration in
~/.kafka-shell/config
:command_prefix: kubectl exec svc/kafka1 --
The text was updated successfully, but these errors were encountered: