Execute Kafka Shell Scripts
When working with Kafka, you may need to execute shell scripts to perform administrative tasks. This page describes how to execute Kafka shell scripts.
Before you begin
You need to have a UMH cluster. If you do not already have a cluster, you can create one by following the Getting Started guide.
You also need to access the system where the cluster is running, either by logging into it or by using a remote shell.
Open a shell in the Kafka container
From the instance’s shell, execute this command:
sudo $(which kubectl) exec -it united-manufacturing-hub-kafka-0 -n united-manufacturing-hub --kubeconfig /etc/rancher/k3s/k3s.yaml -- /bin/sh
Navigate to the Kafka bin directory:
Execute any Kafka shell scripts. For example, to list all topics:
./kafka-topics.sh --list --zookeeper zookeeper:2181
Exit the shell by typing