Lab: Kafka

Kafka-docker-compose is a tool or method that allows you to easily configure and set up Apache Kafka along with its components such as Kafka Brokers, ZooKeeper, Kafka Connect, and more in a Docker environment. Using docker-compose, you can define and run multi-container Docker applications where each service (like a Kafka broker or ZooKeeper) is defined in a docker-compose.yml file.

This approach simplifies the complexities of network configurations between these services and ensures that you have a reproducible and isolated environment for development, testing, and potentially production scenarios. It allows for easy scaling of Kafka brokers and other services within your cluster.

Lets start with a simple cluster that consists of: 1 Broker & 1 Controller - Zookeeper mode.

  1. Execute the following command (adds JMX agents for Prometheus & Grafana).

cd
cd ~/kafka-docker-composer
python3 kafka_docker_composer.py -b 1 -z 1 -p
  1. Execute the generated docker-compose.yml file.

cd
cd ~/kafka-docker-composer
docker compose up -d

Conduktor

The Conduktor Console is a powerful user interface (UI) for managing Apache Kafka. It simplifies Kafka-related tasks and provides visibility into your Kafka ecosystem. Here are some key features:

  1. Data Exploration:

    • The Console allows you to explore Kafka data easily.

    • You can troubleshoot and debug Kafka issues.

    • Drill down into topic data and monitor streaming applications.

  2. Single Interface:

    • Concentrates all Kafka APIs into a unified interface.

    • Provides a streamlined experience for Kafka users.

  3. Collaborative Kafka Platform:

    • Offers autonomy, automation, and advanced features for developers.

    • Ensures security, standards, and governance for platform teams.

    • Complements your Kafka provider with versatile solutions.

  1. Start Konduktor.

cd
cd ~/Conduktor-2.24.9/bin
./conduktor
  1. Click on: +New Kafka Cluster

  1. Enter the following settings.

Cluster Name

Kafka

Bootstrap Servers

localhost:9091

Color

Choose a colour

Test Kafka Connectivity

  1. Click Save.

  2. Click on configured connection.

Last updated