Install Apache Kafka on Ubuntu 26.04 using KRaft mode (Kafka 4.x without ZooKeeper) and legacy ZooKeeper setup (Kafka 3.x). Complete step-by-step DevOps guide with scripts, testing, and production configuration.
- Overview
- Quick Start
- Why This Repository
- Features
- Installation Guides
- Architecture
- Getting Started Resources
- Advanced Topics
- Project Structure
- Important Notes
- License
- Keywords
This repository provides a complete step-by-step guide to install Apache Kafka on Ubuntu 26.04, covering both:
- ✅ Kafka 4.x (KRaft Mode — No ZooKeeper)
- ✅ Kafka 3.x (ZooKeeper-based setup)
It includes automated scripts, manual guides, and production-ready configurations designed for:
- DevOps Engineers
- Cloud Engineers
- Backend Engineers
- Kafka Beginners & Professionals
cd kafka-kraft-install-ubuntu-26
chmod +x install-kafka-kraft-ubuntu-26.sh
./install-kafka-kraft-ubuntu-26.shcd kafka-zookeeper-install-ubuntu-26
chmod +x install-kafka-zookeeper-ubuntu-26.sh
./install-kafka-zookeeper-ubuntu-26.sh- Optimized for Ubuntu 26.04 LTS
- Covers both modern (KRaft) and legacy (ZooKeeper) setups
- Includes automation scripts + manual guides
- Production-ready configuration
- Clean and DevOps-friendly structure
- ✅ Kafka 4.x installation using KRaft (no ZooKeeper)
- ✅ Kafka 3.x installation using ZooKeeper
- ✅ Automated installation scripts
- ✅ systemd service setup
- ✅ Topic creation & testing
- ✅ Production-ready configuration guidance
- ✅ Clean DevOps-friendly structure
👉 Install Kafka 4.x (KRaft Mode) on Ubuntu 26.04
👉 Install Kafka 3.x with ZooKeeper on Ubuntu 26.04
- Kafka 4.x uses KRaft mode (no ZooKeeper required)
- Kafka 3.x uses ZooKeeper for cluster coordination
- Default Kafka port: 9092
- Supports single-node and multi-node setups
- Apache Kafka Documentation: https://kafka.apache.org/documentation/
- Kafka Quickstart: https://kafka.apache.org/quickstart
- Kafka Configuration Guide: https://kafka.apache.org/documentation/#configuration
- Kafka KRaft vs ZooKeeper architecture
- Multi-broker cluster setup
- Log retention & storage tuning
- JVM memory optimization
- Firewall & security configuration
- Monitoring (JMX, Prometheus, Grafana)
- Kafka performance tuning
kafka-install-ubuntu-26/
│
├── README.md
├── LICENSE
│
├── kafka-kraft-install-ubuntu-26/
│ ├── install-kafka-kraft-ubuntu-26.sh
│ └── kafka-kraft-install-ubuntu-26.md
│
├── kafka-zookeeper-install-ubuntu-26/
│ ├── install-kafka-zookeeper-ubuntu-26.sh
│ └── kafka-zookeeper-install-ubuntu-26.md
│
└── assets/
└── kafka-installation-architecture-ubuntu-26.png
- Install Java (OpenJDK 17 or 21 recommended) Support Java 25 - I have tested It
- Ensure port 9092 is open
- Use systemd for production deployments
- For production:
- Enable authentication (SASL/SSL)
- Configure log retention
- Use multi-broker setup
MIT License
kafka install ubuntu 26.04
apache kafka installation ubuntu
kafka kraft install ubuntu
kafka without zookeeper
kafka 4 installation guide
kafka zookeeper setup ubuntu
kafka devops setup
kafka server ubuntu
