- How to set up WSL2 on Windows
- 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 WSL2
WSL2 provides a Linux environment on Windows without a virtual machine. Open PowerShell as Administrator and run:Step 2: Disable IPv6 on WSL2
WSL2 has a networking issue that prevents external programs from connecting to Kafka. Disable IPv6 to fix this:Step 3: Install Java JDK 11
In your WSL2 Ubuntu terminal:Step 4: Download and extract Kafka
Step 5: Generate cluster ID
KRaft clusters require a unique identifier:76BLQI7sT_ql1mBfKsOk9Q. Save this value.
Step 6: Format storage
Format the log directory using your cluster ID (replace<uuid> with your generated UUID):
log.dirs (default: /tmp/kraft-combined-logs).
Step 7: Start Kafka
localhost:9092 in KRaft mode.
Step 8: Configure PATH
Add Kafka binaries to your PATH:See it in practice with ConduktorConduktor Console can connect to your WSL2 KRaft cluster at
localhost:9092 from Windows for visual topic management.Next steps
- CLI tutorials to create topics and produce messages
- KRaft mode concepts for deeper understanding
- Windows ZooKeeper installation for traditional setup