/kafka-kraft-on-k8s

Apache Kafka KRaft Source + Helm Chart

Primary LanguageShellApache License 2.0Apache-2.0

Kafka KRaft on Kubernetes Helm Chart (K4C)

Apache Kafka starting in version 3.3 is using the Raft metadata protocol production ready to abandon the appendage ZooKeeper overhead to control the cluster's health.

More info can be found in the official Apache Kafka docs https://kafka.apache.org/documentation/#kraft

News

14 Mar 2024 - ConfigMaps, new debugmode, minor fixes

  • added feature to configure kafka cluster with helm charts
  • minor fixes
  • added better ability to run the cluster dynamically in broker only mode
  • redesigned debugmode

07 Mar 2024 - KafkaKRaft deployment options

  • Server mode (process.roles = broker, controller)
  • Broker and Controller mode ((process.roles = broker) deploys a broker cluster and a controller cluster)
  • Connect mode (100% dynamic)

26 Oct 2023 - Helm Chart released

Public DockerHub Imageregistry

Table of Content


Author

Stefan Jährling @ System Vertrieb Alexander GmbH

✨ As several repositories on github share similar approaches, I added my own. Inspired by some of them for you to try out. ✨

Benefits

  • Helm Chart (feat: RBAC, SA, HPA, AS)
  • featuring StatefulSets
  • clustered with at least 3 nodes
  • Kafka logdata on persistent volume /node
  • environment variables in manifest
  • up-to-date light-weight Kafka Connect Cluster
  • add connectors as easy as build an image
  • runs in any containerized environment

Changelog

[v1.1.0]

  • added feature to configure kafka cluster with helm charts
  • minor fixes
  • added better ability to run the cluster dynamically in broker only mode
  • redesigned debugmode

[v1.0.2]

  • fixed Kafka Connect to be fully dynamic
  • added KRaft controller
  • added Broker process.roles
  • added several parameters to values.yaml for flexibility

[v1.0.1]

  • Minor fix (package version, image name in values.yaml)

[v1.0.0]

  • Refactored repository structure
  • First Helm release

[v0.7b]

  • JMX definition
  • Kafka Connect Splunk integration

[v0.7a]

  • Kafka Connect
  • Minor manifest changes
  • Replication factor
  • Added topic autocreation env

[v0.7]

  • Bug: Kafka runs as nonroot user in some cases
  • Bumped Kafka Connect to v3.6.0
  • Bumped base image to openjdk.22-bookworm
  • Open fixme for DEFAULT_REPLICATION_FACTOR

[v0.6]

  • Bumped Kafka to v3.6.0
  • Switched back to root user for compatibility

[v0.5a]

  • Backported to Kafka v3.3.2 due to unfixed bug

[v0.5]

  • Kafka Connect
  • Updated GitHub Actions

[v0.4a]

  • Bumped Kafka to v3.4.0

[v0.4]

  • Bugfixed nonroot app-dir to /opt/kafka
  • Kafka data logdir in /mnt/kafka as PV
  • CLUSTER_ID can be set in manifest as ENV

[v0.3]

  • Bugfix: Kafka random bootstrap error due to empty cluster_id
  • Cluster_id is hard coded until fix
  • Separate PVCs (100Gi) for each replica

[v0.2]

  • Unprivileged user to run as non-root
  • Using Kafka v3.3.2

[v0.1]

  • Dockerfile
  • Updated entrypoint.sh
  • Switched to Kafka v3.3.1

Donations are very welcome, this will motivate to sleep less and code harder :3

ko-fi --