- How to install Java 11 (required dependency)
- How to generate a cluster ID and format storage
- How to start Kafka in KRaft mode
- How to configure your PATH for CLI access
Installation overview
Step 1: Install Java JDK 11
Kafka requires Java 11 or later.- Download Amazon Corretto 11 (free OpenJDK distribution)
- Double-click the downloaded
.pkgfile - Follow the installation wizard
Step 2: Download and extract Kafka
Download from kafka.apache.org/downloads (choose the latest binary with Scala 2.13) and extract:Step 3: Generate cluster ID
KRaft clusters require a unique identifier:76BLQI7sT_ql1mBfKsOk9Q. Save this value.
Step 4: Format storage
Format the log directory using your cluster ID (replace<uuid> with your generated UUID):
log.dirs (default: /tmp/kraft-combined-logs).
Step 5: Start Kafka
localhost:9092 in KRaft mode.
Step 6: Configure PATH
Add Kafka binaries to your PATH for convenient access. Edit your shell configuration file (~/.zshrc for zsh or ~/.bashrc for bash):
See it in practice with ConduktorConduktor Console can connect to your KRaft cluster at
localhost:9092 for visual topic management.Next steps
- CLI tutorials to create topics and produce messages
- KRaft mode concepts for deeper understanding
- Mac ZooKeeper installation for traditional setup