Helm chartv0.3.0App 3.6.1

Apache Kafka streaming platform with KRaft mode and management UI

About this chart

Apache Kafka Helm Chart

Apache Kafka streaming platform with KRaft mode (no Zookeeper) and management UI.

Features

  • ✅ Kafka 3.6.1 - Latest stable version
  • ✅ KRaft Mode - No Zookeeper dependency
  • ✅ Kafka UI - Web-based management interface
  • ✅ Production-Ready - StatefulSet with persistent storage
  • ✅ SASL Authentication - Optional authentication support
  • ✅ Easy Operations - 20+ Makefile commands
  • ✅ HA Support - Multi-broker clustering
  • ✅ Monitoring Ready - Health probes and metrics

Quick Start

# Add the Helm repository
helm repo add scripton-charts https://scriptonbasestar-container.github.io/sb-helm-charts
helm repo update

# Install with default values (development)
helm install my-kafka scripton-charts/kafka

# Access Kafka UI
kubectl port-forward svc/my-kafka-ui 8080:8080
# Open http://localhost:8080

KRaft Mode

This chart uses Kafka's KRaft mode (Kafka Raft metadata mode) instead of Zookeeper:

Benefits:

  • Simpler architecture - no external coordination service
  • Faster metadata operations
  • Reduced operational complexity
  • Better scalability

Combined Mode:

  • Each broker acts as both broker and controller
  • Suitable for small to medium deployments
  • Simplified configuration

Installation

Development

helm install my-kafka scripton-charts/kafka \
  -f https://raw.githubusercontent.com/scriptonbasestar-container/sb-helm-charts/master/charts/kafka/values-dev.yaml

Production (3-broker cluster)

helm install my-kafka scripton-charts/kafka \
  -n production \
  -f https://raw.githubusercontent.com/scriptonbasestar-container/sb-helm-charts/master/charts/kafka/values-small-prod.yaml \
  --set kafka.sasl.password='<STRONG_PASSWORD>' \
  --set persistence.storageClass='fast-ssd'

Configuration

Topic Defaults

kafka:
  numPartitions: 3
  defaultReplicationFactor: 3
  minInsyncReplicas: 2
  autoCreateTopicsEnable: false  # Disable for production

SASL Authentication

kafka:
  sasl:
    enabled: true
    mechanisms: "PLAIN"
    username: "admin"
    password: "<strong-password>"

Kafka UI

kafkaUI:
  enabled: true
  ingress:
    enabled: true
    className: "nginx"
    hosts:
      - host: kafka-ui.example.com
        paths:
          - path: /
            pathType: Prefix

Operations

Topic Management

# List topics
make -f make/ops/kafka.mk kafka-topics-list

# Create topic
make -f make/ops/kafka.mk kafka-topic-create TOPIC=my-topic PARTITIONS=3 REPLICATION=2

# Describe topic
make -f make/ops/kafka.mk kafka-topic-describe TOPIC=my-topic

# Delete topic
make -f make/ops/kafka.mk kafka-topic-delete TOPIC=my-topic

Producer/Consumer Testing

# Produce messages (interactive)
make -f make/ops/kafka.mk kafka-produce TOPIC=my-topic

# Consume messages
make -f make/ops/kafka.mk kafka-consume TOPIC=my-topic

Consumer Groups

# List consumer groups
make -f make/ops/kafka.mk kafka-consumer-groups-list

# Describe consumer group
make -f make/ops/kafka.mk kafka-consumer-group-describe GROUP=my-group

Broker Information

# List brokers
make -f make/ops/kafka.mk kafka-broker-list

# Get cluster ID
make -f make/ops/kafka.mk kafka-cluster-id

# View logs
make -f make/ops/kafka.mk kafka-logs

Values Profiles

values-dev.yaml

  • Single broker
  • Auto-create topics enabled
  • 1-day retention
  • 5Gi storage
  • No authentication

values-small-prod.yaml

  • 3 brokers for HA
  • Auto-create topics disabled
  • 7-day retention
  • 50Gi SSD storage
  • SASL authentication
  • Anti-affinity rules

Troubleshooting

Broker not starting

Check cluster ID and controller voters:

kubectl logs kafka-0
# Look for KRaft configuration errors

Topics not replicating

Check replication factor matches broker count:

make -f make/ops/kafka.mk kafka-topic-describe TOPIC=my-topic

Cannot produce/consume

Check SASL configuration:

# Verify authentication
kubectl exec kafka-0 -- kafka-broker-api-versions.sh --bootstrap-server localhost:9092

Production Recommendations

1. Use Operators for Large Deployments

For production clusters >3 brokers, consider Strimzi Kafka Operator:

  • Automatic rolling updates
  • TLS encryption
  • Advanced monitoring
  • Multi-cluster support

2. Broker Count

  • Development: 1 broker
  • Small Production: 3 brokers
  • Large Production: 5+ brokers (use operator)

3. Storage

persistence:
  storageClass: "fast-ssd"  # Use SSD for better performance
  size: 100Gi  # Size based on retention requirements

4. Resource Planning

Memory:

  • Heap: 50% of container memory limit
  • Page cache: Remaining 50%

Example for 4Gi memory:

resources:
  limits:
    memory: 4Gi
kafka:
  extraEnv:
    - name: KAFKA_HEAP_OPTS
      value: "-Xmx2G -Xms2G"

5. Retention Planning

Calculate storage needs:

Storage = Messages/day × Message size × Retention days × Replication factor

6. Monitoring

Enable JMX exporter for Prometheus:

kafka:
  extraEnv:
    - name: KAFKA_JMX_OPTS
      value: "-javaagent:/opt/jmx-exporter/jmx-exporter.jar=7071:/etc/jmx-exporter/config.yml"

License

This Helm chart is licensed under the BSD-3-Clause License.

Apache Kafka is licensed under the Apache License 2.0.

Maintainers


Chart Version: 0.1.0
Kafka Version: 3.6.1
Last Updated: 2025-11

Deploy kafka with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kafka on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkafka is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply