<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Gilson Oliveira</title>
    <description>The latest articles on Forem by Gilson Oliveira (@gilson_oliveira).</description>
    <link>https://forem.com/gilson_oliveira</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1803093%2F65124098-3f2d-4af1-ba1c-81dc95c6cb31.png</url>
      <title>Forem: Gilson Oliveira</title>
      <link>https://forem.com/gilson_oliveira</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gilson_oliveira"/>
    <language>en</language>
    <item>
      <title>Don't Let Bitnami Changes Break Your Kafka Pipelines: Migrate to KRaft Mode Now</title>
      <dc:creator>Gilson Oliveira</dc:creator>
      <pubDate>Thu, 28 Aug 2025 20:40:49 +0000</pubDate>
      <link>https://forem.com/gilson_oliveira/dont-let-bitnami-changes-break-your-kafka-pipelines-migrate-to-kraft-mode-now-4ol4</link>
      <guid>https://forem.com/gilson_oliveira/dont-let-bitnami-changes-break-your-kafka-pipelines-migrate-to-kraft-mode-now-4ol4</guid>
      <description>&lt;p&gt;Bitnami is deprecating their Kafka images, and ZooKeeper is being removed from Apache Kafka 4.0. Time to migrate to KRaft mode with Confluent's official images for a future-proof, simpler architecture.&lt;/p&gt;

&lt;p&gt;If you're using bitnami/kafka in your Docker setup, you've probably seen this warning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Important Notice: Beginning August 28th, 2025, Bitnami will evolve its public catalog... All existing container images have been migrated to "Bitnami Legacy" repository where they will no longer receive updates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But there's a bigger issue: Apache Kafka is removing ZooKeeper entirely in version 4.0. Most current setups still rely on ZooKeeper, which means double trouble ahead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution: KRaft Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;KRaft (Kafka Raft) eliminates ZooKeeper dependency entirely, giving you:&lt;/p&gt;

&lt;p&gt;✅ Simpler architecture (fewer moving parts)&lt;br&gt;
✅ Better performance and scalability&lt;br&gt;
✅ Future-proof (ZooKeeper support ends with Kafka 3.9)&lt;br&gt;
✅ Faster startup and recovery times&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before: The Old Way&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3.8'
services:
  zookeeper:
    image: bitnami/zookeeper:latest
    ports:
      - "2181:2181"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes

  kafka:
    image: bitnami/kafka:latest
    ports:
      - "9092:9092"
    environment:
      - KAFKA_BROKER_ID=1
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
    depends_on:
      - zookeeper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deprecated Bitnami images (no more updates)&lt;/li&gt;
&lt;li&gt;ZooKeeper dependency (removed in Kafka 4.0)&lt;/li&gt;
&lt;li&gt;Two services to manage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;After: The Modern KRaft Way&lt;/strong&gt;&lt;br&gt;
Here's the future-proof solution using Confluent's official image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3.8'
services:
  kafka:
    image: confluentinc/cp-kafka:7.4.0
    ports:
      - "9092:9092"
    environment:
      # KRaft Configuration
      KAFKA_NODE_ID: 1
      KAFKA_PROCESS_ROLES: broker,controller
      KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
      KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
      CLUSTER_ID: MkU3OEVBNTcwNTJENDM1Tk

      # Network Configuration  
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
      KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092

      # Storage Configuration
      KAFKA_LOG_DIRS: /tmp/kraft-combined-logs

      # Topic Configuration
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Configuration Explained&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me break down the important KRaft settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KAFKA_NODE_ID: 1                           # Unique node identifier
KAFKA_PROCESS_ROLES: broker,controller     # Combined mode (handles both roles)
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093  # Controller election setup
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk         # Unique cluster identifier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Network Configuration&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The controller listener (port 9093) is used internally for KRaft consensus, while 9092 remains your application port.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits You'll See Immediately&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Faster Startup: No waiting for ZooKeeper election&lt;/li&gt;
&lt;li&gt;Simpler Debugging: One service instead of two&lt;/li&gt;
&lt;li&gt;Better Resource Usage: No ZooKeeper overhead&lt;/li&gt;
&lt;li&gt;Future-Proof: Ready for Kafka 4.0&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The writing is on the wall: ZooKeeper is going away, and Bitnami is changing their strategy. Don't wait for your pipelines to break in production.&lt;br&gt;
KRaft mode isn't just a workaround, it's genuinely better. Simpler architecture, better performance. Your future self will thank you for making this change now.&lt;/p&gt;

&lt;p&gt;Have you made the switch to KRaft? let me know your experience in the comments!&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>devops</category>
      <category>docker</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
