Apache Kafka 4 · Start a broker (KRaft)
Format the log directories
Prepare storage for a single-node cluster. Do this once per new cluster.
bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/server.properties
Caution: Formatting an existing cluster's storage can destroy its data. Only run it on a new node.
Official Apache Kafka 4 documentation
More start a broker (kraft) commands
All start a broker (kraft) commands · Apache Kafka 4 cheatsheet