confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 704 forks source link

confluentinc/cp-kafka:latest missing kafka directory? #737

Open SamD opened 5 years ago

SamD commented 5 years ago

I installed Kafka via Helm after which the status suggested to connect

  apiVersion: v1
  kind: Pod
  metadata:
    name: testclient
    namespace: testns
  spec:
    containers:
    - name: kafka
      image: confluentinc/cp-kafka:5.0.1
      command:
        - sh
        - -c
        - "exec tail -f /dev/null"

Once you have the testclient pod above running, you can list all kafka
topics with:

  kubectl -n testns exec testclient -- /opt/kafka/bin/kafka-topics.sh --zookeeper testns-kafka-zookeeper:2181 --list

Unfortunately the command produced a no file/directory error for kafka, connecting to the pod shows the /opt directory empty.

OneCricketeer commented 5 years ago

Do you need the absolute path? I think this should work

kubectl -n testns exec testclient -- kafka-topics --zookeeper testns-kafka-zookeeper:2181 --list

doquang1996 commented 3 years ago

just kafka-topics, not kafka-topics.sh or any more

OneCricketeer commented 3 years ago

If the script is on the containers PATH and executable, extensions don't matter