Skip to content
Kafka icon
v1.5.3App: v4.3.1Pinned DigestS3 Backup Ready

Production Helm chart • Apache-2.0 • Zero-Root • Verified on Kubernetes v1.33-v1.36+

Kafka

Apache Kafka for Kubernetes using a KRaft-only design. The chart supports the official apache/kafka JVM runtime by default and the experimental apache/kafka-native runtime as an option.

When runtime=native, an init container based on apache/kafka generates server.properties and formats KRaft storage before the native container starts. Apache currently recommends the native image for local development and testing rather than production.

This chart intentionally supports two clear topologies:

  • single-broker for development and simple internal environments
  • cluster for production-oriented deployments with dedicated controllers and brokers

Install

HTTPS repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install kafka helmforge/kafka -f values.yaml

OCI registry

helm install kafka oci://ghcr.io/helmforgedev/helm/kafka -f values.yaml

Supported architectures

Architecture When to use Document
single-broker development, CI, demos, and simple internal workloads without node-level broker redundancy docs/single-broker.md
cluster production-oriented Kafka with dedicated KRaft controllers and brokers docs/cluster.md
cluster (combined mode) 3-node HA production deployments where each controller also acts as a broker (brokers.replicaCount: 0) docs/combined-mode.md

What this chart covers

  • KRaft only
  • official Kafka 4.3.1 JVM or native runtime image
  • JVM-based setup init container when the native runtime is selected
  • persistent storage for single-broker, controllers, and brokers
  • automatic cleanup of lost+found directories in PVCs (ext4/xfs compatibility)
  • stable in-cluster advertised listeners for brokers
  • explicit KRaft cluster ID and controller directory ID secret handling
  • optional Prometheus metrics through a SHA-256 verified JMX exporter javaagent for the JVM runtime
  • optional ServiceMonitor
  • optional PodDisruptionBudget
  • support for extraInitContainers for custom initialization logic

What this chart does not try to automate in v1

  • ZooKeeper mode
  • external listeners or cloud load balancer matrices
  • TLS, SASL, ACLs, and credential lifecycle
  • ecosystem components such as Kafka Connect, MirrorMaker, Schema Registry, or UIs

Official references

Quick start

Single broker:

architecture: single-broker

singleBroker:
  persistence:
    size: 8Gi

Native single broker for development/testing:

runtime: native
architecture: single-broker

Cluster (dedicated controllers and brokers):

architecture: cluster

cluster:
  minInSyncReplicas: 2
  controllers:
    replicaCount: 3
    persistence:
      size: 8Gi
  brokers:
    replicaCount: 3
    persistence:
      size: 50Gi

pdb:
  enabled: true

Cluster (combined mode - controllers act as brokers):

architecture: cluster

cluster:
  minInSyncReplicas: 2
  controllers:
    replicaCount: 3
    persistence:
      size: 50Gi
  brokers:
    replicaCount: 0  # Combined mode: process.roles=broker,controller

pdb:
  enabled: true

Metrics:

# Metrics require runtime=jvm.
metrics:
  enabled: true
  serviceMonitor:
    enabled: true

Production direction

  • use cluster in production
  • keep dedicated controllers and brokers
  • validate topic creation, producer, and consumer flows before promotion
  • keep persistence enabled for both controllers and brokers
  • treat external access, TLS, and auth as deliberate follow-up work rather than hidden defaults
Official Schema

Values & Configuration Reference

All schema parameters, types, defaults, and allowed values are extracted directly from the chart repository. Filter and search them in the interactive reference below or customize in Values Studio.

View Values Schema

|-----------|-------------|---------| | runtime | Kafka runtime: jvm or native | jvm | | architecture | single-broker or cluster | single-broker | | image.repository | JVM runtime and native setup image repository | apache/kafka | | image.tag | JVM Kafka image tag | 4.3.1 | | native.image.repository | Native runtime image repository | apache/kafka-native | | native.image.tag | Native Kafka image tag | 4.3.1 | | service.type | Client bootstrap service type | ClusterIP | | service.ipFamilyPolicy | Service IP family policy for client, headless, and metrics Services | "" | | service.ipFamilies | Service IP families for client, headless, and metrics Services | [] | | kraft.existingSecret | Existing secret for cluster ID and controller directory IDs | "" | | listeners.client.port | Kafka client port | 9092 | | listeners.controller.port | KRaft controller port | 9093 | | listeners.interBroker.port | Inter-broker port | 9094 | | config.numPartitions | Default partitions for new topics | 3 | | config.autoCreateTopicsEnabled | Enable automatic topic creation | false | | singleBroker.persistence.enabled | Enable PVC in single-broker mode | true | | cluster.controllers.replicaCount | Controller replicas in cluster mode | 3 | | cluster.brokers.replicaCount | Broker replicas in cluster mode. Set to 0 for combined mode (controllers act as brokers) | 3 | | cluster.minInSyncReplicas | Minimum ISR in cluster mode | 2 | | metrics.enabled | Enable JMX exporter javaagent metrics | false | | metrics.agent.url | JMX exporter javaagent download URL | Maven Central 1.0.1 jar | | metrics.agent.sha256 | SHA-256 checksum for the JMX exporter javaagent | 7d61f737... | | metrics.serviceMonitor.enabled | Create ServiceMonitor resources | false | | pdb.enabled | Create PodDisruptionBudgets in cluster mode | false | | podSecurityContext | Pod security context | fsGroup: 1000, RuntimeDefault seccomp | | securityContext | Container security context | uid 1000, runAsNonRoot, no escalation, drop ALL | | automountServiceAccountToken | Mount the ServiceAccount token | false |

Topics created without an explicit replication factor use default.replication.factor: 1 in single-broker mode and the internal replication factor (up to 3) in cluster mode.

Security

  • Pods run as uid 1000 without privilege escalation, with every capability dropped, RuntimeDefault seccomp, and no ServiceAccount token.
  • All listeners use PLAINTEXT. Keep Kafka inside a trusted network boundary and restrict access with NetworkPolicies; TLS and SASL are not modeled yet.

Security Scan: kafka

Framework Score
MITRE + NSA + SOC2 86.36364%

Security posture acceptable.

CI scenarios

The ci/ directory covers the main supported paths:

  • single-broker.yaml
  • cluster.yaml
  • combined-mode.yaml
  • metrics.yaml
  • cluster-tuned.yaml
  • native-single-broker.yaml
  • native-cluster.yaml
  • native-combined-mode.yaml

Examples

See examples/:

Architecture guides

Important notes

  • the bootstrap service is internal-only in v1
  • broker advertised listeners use stable StatefulSet pod DNS names
  • for production, do not treat this chart as a shortcut around Kafka capacity planning, topic design, and client retry behavior
  • the chart automatically removes lost+found directories from PVCs during pod initialization to prevent Kafka startup failures on ext4/xfs filesystems
  • metrics.enabled is supported only with runtime=jvm
  • keep image.tag and native.image.tag aligned when using runtime=native

System Architecture

DESIGN.md Synced

Verified architecture contract rendered dynamically from GitHub DESIGN.md

flowchart LR
  clients[Kafka clients] --> bootstrap[Client bootstrap Service]
  bootstrap --> single[Single broker StatefulSet]
  bootstrap --> brokers[Broker StatefulSet]
  brokers --> brokerpvc[(Broker PVCs)]
  controllers[Controller StatefulSet] --> controllerpvc[(Controller PVCs)]
  controllers <--> brokers
  kraft[KRaft Secret optional] --> controllers
  metrics[JMX exporter javaagent optional] --> sm[ServiceMonitor optional]
  setup[JVM setup init container in native mode] --> single
  setup --> controllers
  setup --> brokers
Official Contractvalues.schema.json

Kafka Values Schema Reference

Official schema parameters, default values, and types extracted directly from the chart repository.

101 parametersValues Studio

Global(1)

ParameterTypeDefaultDescription
globalobject-Global settings shared by the chart.

Runtime(1)

ParameterTypeDefaultDescription
runtimestring-Kafka runtime implementation: jvm | native
Allowed:jvmnative

Architecture(1)

ParameterTypeDefaultDescription
architecturestring-Architecture: single-broker | cluster
Allowed:single-brokercluster

Name Override(1)

ParameterTypeDefaultDescription
nameOverridestring-Override release name

Fullname Override(1)

ParameterTypeDefaultDescription
fullnameOverridestring-Override full release name

Common Labels(1)

ParameterTypeDefaultDescription
commonLabelsobject-Labels added to all resources

Common Annotations(1)

ParameterTypeDefaultDescription
commonAnnotationsobject-Annotations added to all chart-owned resources

Cluster Domain(1)

ParameterTypeDefaultDescription
clusterDomainstring-Kubernetes cluster domain

Image(3)

ParameterTypeDefaultDescription
image.repositorystring-Kafka image repository
image.tagstring-Kafka image tag
image.pullPolicystring-Kafka image pull policy
Allowed:AlwaysIfNotPresentNever

Native(3)

ParameterTypeDefaultDescription
native.image.repositorystring-Native Kafka image repository
native.image.tagstring-Native Kafka image tag
native.image.pullPolicystring-Native Kafka image pull policy
Allowed:AlwaysIfNotPresentNever

Image Pull Secrets(1)

ParameterTypeDefaultDescription
imagePullSecretsarray-Image pull secrets for private registries

Kraft(4)

ParameterTypeDefaultDescription
kraft.existingSecretstring-Existing secret containing the KRaft cluster ID and controller directory IDs
kraft.existingSecretClusterIdKeystring-Secret key for the cluster ID inside kraft.existingSecret
kraft.existingSecretControllerDirectoryIdPrefixstring-Prefix for controller directory IDs inside kraft.existingSecret
kraft.clusterIdstring-Explicit cluster ID used when kraft.existingSecret is not set

Listeners(3)

ParameterTypeDefaultDescription
listeners.client.portinteger-Client listener port
listeners.controller.portinteger-Controller listener port
listeners.interBroker.portinteger-Inter-broker listener port (cluster mode only)

Service & Networking(5)

ParameterTypeDefaultDescription
service.typestring-Client bootstrap service type
Allowed:ClusterIPNodePortLoadBalancer
service.annotationsobject-Annotations applied to the client service
service.labelsobject-Extra labels applied to the client service
service.ipFamilyPolicystring-Service IP family policy applied to Kafka client, headless, and metrics Services
Allowed:SingleStackPreferDualStackRequireDualStack
service.ipFamiliesarray-Service IP families applied to Kafka client, headless, and metrics Services

Configuration(9)

ParameterTypeDefaultDescription
config.numPartitionsinteger-Number of partitions used as the broker default
config.autoCreateTopicsEnabledboolean-Enable automatic topic creation
config.deleteTopicEnabledboolean-Allow topic deletion
config.logRetentionHoursinteger-Default log retention in hours
config.logSegmentBytesinteger-Default segment size in bytes
config.commonstring-Extra configuration appended to every generated server.properties
config.singleBrokerstring-Extra configuration appended only in single-broker mode
config.controllerstring-Extra configuration appended only on controllers in cluster mode
config.brokerstring-Extra configuration appended only on brokers in cluster mode

Single Broker(7)

ParameterTypeDefaultDescription
singleBroker.persistence.enabledboolean-Enable PVCs in single-broker mode
singleBroker.persistence.storageClassstring-Storage class for single-broker mode
singleBroker.persistence.accessModesarray-Access modes for single-broker mode
singleBroker.persistence.sizestring-PVC size for single-broker mode
singleBroker.persistence.retentionPolicy.whenDeletedstring-Chart configuration parameter
Allowed:DeleteRetain
singleBroker.persistence.retentionPolicy.whenScaledstring-Chart configuration parameter
Allowed:DeleteRetain
singleBroker.resourcesobject-Resource requests and limits for the single broker

Cluster(17)

ParameterTypeDefaultDescription
cluster.minInSyncReplicasinteger-Minimum in-sync replicas for internal topics and recommended production default
cluster.controllers.replicaCountinteger-Number of dedicated controller replicas
cluster.controllers.persistence.enabledboolean-Enable controller PVCs
cluster.controllers.persistence.storageClassstring-Storage class for controller PVCs
cluster.controllers.persistence.accessModesarray-Access modes for controller PVCs
cluster.controllers.persistence.sizestring-PVC size per controller
cluster.controllers.persistence.retentionPolicy.whenDeletedstring-Chart configuration parameter
Allowed:DeleteRetain
cluster.controllers.persistence.retentionPolicy.whenScaledstring-Chart configuration parameter
Allowed:DeleteRetain
cluster.controllers.resourcesobject-Resource requests and limits for controllers
cluster.brokers.replicaCountinteger-Number of dedicated broker replicas. Set to 0 to enable combined mode where each controller also acts as a broker (process.roles=broker,controller). Useful for 3-node HA without separate controller and broker StatefulSets. When non-zero, must be at least 3.
cluster.brokers.persistence.enabledboolean-Enable broker PVCs
cluster.brokers.persistence.storageClassstring-Storage class for broker PVCs
cluster.brokers.persistence.accessModesarray-Access modes for broker PVCs
cluster.brokers.persistence.sizestring-PVC size per broker
cluster.brokers.persistence.retentionPolicy.whenDeletedstring-Chart configuration parameter
Allowed:DeleteRetain
cluster.brokers.persistence.retentionPolicy.whenScaledstring-Chart configuration parameter
Allowed:DeleteRetain
cluster.brokers.resourcesobject-Resource requests and limits for brokers

Service Account(3)

ParameterTypeDefaultDescription
serviceAccount.createboolean-Create a ServiceAccount
serviceAccount.namestring-Existing ServiceAccount name
serviceAccount.annotationsobject-Annotations added to the ServiceAccount

Pdb(2)

ParameterTypeDefaultDescription
pdb.enabledboolean-Enable PodDisruptionBudgets where replica count allows them
pdb.minAvailableinteger-Minimum available brokers/controllers when the PDB is enabled

Metrics & Observability(10)

ParameterTypeDefaultDescription
metrics.enabledboolean-Enable Prometheus metrics through the JMX exporter javaagent
metrics.image.repositorystring-Init image repository
metrics.image.tagstring-Init image tag
metrics.image.pullPolicystring-Init image pull policy
Allowed:AlwaysIfNotPresentNever
metrics.agent.urlstring-JMX exporter javaagent download URL
metrics.agent.sha256string-SHA-256 checksum for the JMX exporter javaagent
metrics.portinteger-Metrics port exposed by the javaagent
metrics.serviceMonitor.enabledboolean-Create ServiceMonitor resources (requires Prometheus Operator)
metrics.serviceMonitor.intervalstring-ServiceMonitor interval
metrics.serviceMonitor.labelsobject-ServiceMonitor labels

Pod Security(4)

ParameterTypeDefaultDescription
podSecurityContext.fsGroupinteger-Chart configuration parameter
podSecurityContext.fsGroupChangePolicystring-Chart configuration parameter
Allowed:AlwaysOnRootMismatch
podSecurityContext.seccompProfile.typestring-Chart configuration parameter
Allowed:RuntimeDefaultUnconfinedLocalhost
podSecurityContext.seccompProfile.localhostProfilestring-Chart configuration parameter

Container Security(7)

ParameterTypeDefaultDescription
securityContext.runAsUserinteger-Chart configuration parameter
securityContext.runAsGroupinteger-Chart configuration parameter
securityContext.runAsNonRootboolean-Chart configuration parameter
securityContext.allowPrivilegeEscalationboolean-Chart configuration parameter
securityContext.readOnlyRootFilesystemboolean-Chart configuration parameter
securityContext.capabilities.droparray-Chart configuration parameter
securityContext.capabilities.addarray-Chart configuration parameter

Pod Labels(1)

ParameterTypeDefaultDescription
podLabelsobject-Extra labels for pods

Pod Annotations(1)

ParameterTypeDefaultDescription
podAnnotationsobject-Extra annotations for pods

Annotations(1)

ParameterTypeDefaultDescription
annotationsobject-Extra annotations for all resources

Node Selector(1)

ParameterTypeDefaultDescription
nodeSelectorobject-Node selector for pod scheduling

Tolerations(1)

ParameterTypeDefaultDescription
tolerationsarray-Tolerations for pod scheduling

Affinity(1)

ParameterTypeDefaultDescription
affinityobject-Affinity rules for pod scheduling

Topology Spread Constraints(1)

ParameterTypeDefaultDescription
topologySpreadConstraintsarray-Topology spread constraints for pod scheduling

Priority Class Name(1)

ParameterTypeDefaultDescription
priorityClassNamestring-Priority class name for pods

Termination Grace Period Seconds(1)

ParameterTypeDefaultDescription
terminationGracePeriodSecondsinteger-Termination grace period in seconds

Extra Env(1)

ParameterTypeDefaultDescription
extraEnvarray-Extra environment variables for Kafka containers

Extra Init Containers(1)

ParameterTypeDefaultDescription
extraInitContainersarray-Extra init containers for Kafka pods (in addition to built-in init containers)

Extra Volume Mounts(1)

ParameterTypeDefaultDescription
extraVolumeMountsarray-Extra volume mounts for Kafka containers

Extra Volumes(1)

ParameterTypeDefaultDescription
extraVolumesarray-Extra volumes for Kafka pods

Extra Manifests(1)

ParameterTypeDefaultDescription
extraManifestsarray-Arbitrary extra manifests rendered with tpl

Automount Service Account Token(1)

ParameterTypeDefaultDescription
automountServiceAccountTokenbooleanfalseMount the ServiceAccount token in Kafka pods