kafka

An image used for building real-time data pipelines and event driven applications.


What is kafka

The kafka image provides Apache Kafka, a distributed event streaming platform used for building real-time data pipelines and event-driven applications. kafka is designed to handle high-throughput, fault-tolerant messaging between producers and consumers, and is widely used in logging systems, data ingestion layers, microservices architectures, and analytics pipelines.

This image typically includes both kafka and its required dependency, Apache ZooKeeper (though some newer variants support Kraft mode – kafka without ZooKeeper). It's often deployed as part of a containerized stack using Docker Compose or Kubernetes, especially in development and testing environments.

kafka is commonly used by platform and data engineering teams to decouple services, stream events between systems, or ingest data into platforms like Spark, Flink, and data warehouses.

How to use this image

Kafka requires coordination with ZooKeeper or a Kafka Raft (KRaft) controller. It is typically run as part of a multi-container stack.

Use Docker Compose for local development:

‍yamlCopyEditversion: '3'services:zookeeper:image: bitnami/zookeeper:latestports:- 2181:2181environment:- ALLOW_ANONYMOUS_LOGIN=yes‍kafka:image: bitnami/kafka:latestports:- 9092:9092environment:- KAFKA_BROKER_ID=1- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181- ALLOW_PLAINTEXT_LISTENER=yes

Start a Kafka broker in Kraft mode (Kafka 3.3+):

‍bashCopyEditdocker run -d --name kafka \-p 9092:9092 \-e KAFKA_CFG_PROCESS_ROLES=broker \-e KAFKA_CFG_NODE_ID=1 \-e KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@localhost:9093 \bitnami/kafka:latest

Logging and ports:

Kafka logs tostdout and typically exposes brokers on port 9092. Ensure proper network settings (KAFKA_ADVERTISED_LISTENERS) when connecting across Docker networks or clusters.

Image variants

There are multiple Kafka images available; the most commonly used are from Bitnami and Confluent.

bitnami/kafka:latest

Popular, production-ready Kafka image with flexible environment variable configuration.Supports both Zookeeper and KRaft modes. Based on Debian.

bitnami/kafka:<version>

Tagged by Kafka release version (e.g.3.6.0, 3.5.1). Use for deterministic deployments or version-specific testing.

‍confluentinc/cp-kafka

Part of the Confluent Platform; includes Confluent-specific tools and components. Use if you’re tied to the Confluent ecosystem.

‍wurstmeister/kafka

(legacy) One of the original community Kafka images, but less actively maintained. Generally not recommended for new projects.Choose your image based on ecosystem compatibility (pure OSS vs Confluent), KRaft support, and long-term maintenance.

Interested in base images that start and stay clean?

This is a not a valid email
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.