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-brokerfor development and simple internal environmentsclusterfor 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.1JVM 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+founddirectories 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
extraInitContainersfor 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
clusterin 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
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.
|-----------|-------------|---------|
| 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,
RuntimeDefaultseccomp, 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.yamlcluster.yamlcombined-mode.yamlmetrics.yamlcluster-tuned.yamlnative-single-broker.yamlnative-cluster.yamlnative-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+founddirectories from PVCs during pod initialization to prevent Kafka startup failures on ext4/xfs filesystems metrics.enabledis supported only withruntime=jvm- keep
image.tagandnative.image.tagaligned when usingruntime=native
System Architecture
DESIGN.md SyncedVerified 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
Kafka Values Schema Reference
Official schema parameters, default values, and types extracted directly from the chart repository.
Global(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| global | object | - | Global settings shared by the chart. |
Runtime(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| runtime | string | - | Kafka runtime implementation: jvm | native Allowed: jvmnative |
Architecture(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| architecture | string | - | Architecture: single-broker | cluster Allowed: single-brokercluster |
Name Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nameOverride | string | - | Override release name |
Fullname Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | - | Override full release name |
Common Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonLabels | object | - | Labels added to all resources |
Common Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonAnnotations | object | - | Annotations added to all chart-owned resources |
Cluster Domain(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| clusterDomain | string | - | Kubernetes cluster domain |
Image(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| image.repository | string | - | Kafka image repository |
| image.tag | string | - | Kafka image tag |
| image.pullPolicy | string | - | Kafka image pull policy Allowed: AlwaysIfNotPresentNever |
Native(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| native.image.repository | string | - | Native Kafka image repository |
| native.image.tag | string | - | Native Kafka image tag |
| native.image.pullPolicy | string | - | Native Kafka image pull policy Allowed: AlwaysIfNotPresentNever |
Image Pull Secrets(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| imagePullSecrets | array | - | Image pull secrets for private registries |
Kraft(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| kraft.existingSecret | string | - | Existing secret containing the KRaft cluster ID and controller directory IDs |
| kraft.existingSecretClusterIdKey | string | - | Secret key for the cluster ID inside kraft.existingSecret |
| kraft.existingSecretControllerDirectoryIdPrefix | string | - | Prefix for controller directory IDs inside kraft.existingSecret |
| kraft.clusterId | string | - | Explicit cluster ID used when kraft.existingSecret is not set |
Listeners(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| listeners.client.port | integer | - | Client listener port |
| listeners.controller.port | integer | - | Controller listener port |
| listeners.interBroker.port | integer | - | Inter-broker listener port (cluster mode only) |
Service & Networking(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| service.type | string | - | Client bootstrap service type Allowed: ClusterIPNodePortLoadBalancer |
| service.annotations | object | - | Annotations applied to the client service |
| service.labels | object | - | Extra labels applied to the client service |
| service.ipFamilyPolicy | string | - | Service IP family policy applied to Kafka client, headless, and metrics Services Allowed: SingleStackPreferDualStackRequireDualStack |
| service.ipFamilies | array | - | Service IP families applied to Kafka client, headless, and metrics Services |
Configuration(9)
| Parameter | Type | Default | Description |
|---|---|---|---|
| config.numPartitions | integer | - | Number of partitions used as the broker default |
| config.autoCreateTopicsEnabled | boolean | - | Enable automatic topic creation |
| config.deleteTopicEnabled | boolean | - | Allow topic deletion |
| config.logRetentionHours | integer | - | Default log retention in hours |
| config.logSegmentBytes | integer | - | Default segment size in bytes |
| config.common | string | - | Extra configuration appended to every generated server.properties |
| config.singleBroker | string | - | Extra configuration appended only in single-broker mode |
| config.controller | string | - | Extra configuration appended only on controllers in cluster mode |
| config.broker | string | - | Extra configuration appended only on brokers in cluster mode |
Single Broker(7)
| Parameter | Type | Default | Description |
|---|---|---|---|
| singleBroker.persistence.enabled | boolean | - | Enable PVCs in single-broker mode |
| singleBroker.persistence.storageClass | string | - | Storage class for single-broker mode |
| singleBroker.persistence.accessModes | array | - | Access modes for single-broker mode |
| singleBroker.persistence.size | string | - | PVC size for single-broker mode |
| singleBroker.persistence.retentionPolicy.whenDeleted | string | - | Chart configuration parameter Allowed: DeleteRetain |
| singleBroker.persistence.retentionPolicy.whenScaled | string | - | Chart configuration parameter Allowed: DeleteRetain |
| singleBroker.resources | object | - | Resource requests and limits for the single broker |
Cluster(17)
| Parameter | Type | Default | Description |
|---|---|---|---|
| cluster.minInSyncReplicas | integer | - | Minimum in-sync replicas for internal topics and recommended production default |
| cluster.controllers.replicaCount | integer | - | Number of dedicated controller replicas |
| cluster.controllers.persistence.enabled | boolean | - | Enable controller PVCs |
| cluster.controllers.persistence.storageClass | string | - | Storage class for controller PVCs |
| cluster.controllers.persistence.accessModes | array | - | Access modes for controller PVCs |
| cluster.controllers.persistence.size | string | - | PVC size per controller |
| cluster.controllers.persistence.retentionPolicy.whenDeleted | string | - | Chart configuration parameter Allowed: DeleteRetain |
| cluster.controllers.persistence.retentionPolicy.whenScaled | string | - | Chart configuration parameter Allowed: DeleteRetain |
| cluster.controllers.resources | object | - | Resource requests and limits for controllers |
| cluster.brokers.replicaCount | integer | - | 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.enabled | boolean | - | Enable broker PVCs |
| cluster.brokers.persistence.storageClass | string | - | Storage class for broker PVCs |
| cluster.brokers.persistence.accessModes | array | - | Access modes for broker PVCs |
| cluster.brokers.persistence.size | string | - | PVC size per broker |
| cluster.brokers.persistence.retentionPolicy.whenDeleted | string | - | Chart configuration parameter Allowed: DeleteRetain |
| cluster.brokers.persistence.retentionPolicy.whenScaled | string | - | Chart configuration parameter Allowed: DeleteRetain |
| cluster.brokers.resources | object | - | Resource requests and limits for brokers |
Service Account(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| serviceAccount.create | boolean | - | Create a ServiceAccount |
| serviceAccount.name | string | - | Existing ServiceAccount name |
| serviceAccount.annotations | object | - | Annotations added to the ServiceAccount |
Pdb(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| pdb.enabled | boolean | - | Enable PodDisruptionBudgets where replica count allows them |
| pdb.minAvailable | integer | - | Minimum available brokers/controllers when the PDB is enabled |
Metrics & Observability(10)
| Parameter | Type | Default | Description |
|---|---|---|---|
| metrics.enabled | boolean | - | Enable Prometheus metrics through the JMX exporter javaagent |
| metrics.image.repository | string | - | Init image repository |
| metrics.image.tag | string | - | Init image tag |
| metrics.image.pullPolicy | string | - | Init image pull policy Allowed: AlwaysIfNotPresentNever |
| metrics.agent.url | string | - | JMX exporter javaagent download URL |
| metrics.agent.sha256 | string | - | SHA-256 checksum for the JMX exporter javaagent |
| metrics.port | integer | - | Metrics port exposed by the javaagent |
| metrics.serviceMonitor.enabled | boolean | - | Create ServiceMonitor resources (requires Prometheus Operator) |
| metrics.serviceMonitor.interval | string | - | ServiceMonitor interval |
| metrics.serviceMonitor.labels | object | - | ServiceMonitor labels |
Pod Security(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podSecurityContext.fsGroup | integer | - | Chart configuration parameter |
| podSecurityContext.fsGroupChangePolicy | string | - | Chart configuration parameter Allowed: AlwaysOnRootMismatch |
| podSecurityContext.seccompProfile.type | string | - | Chart configuration parameter Allowed: RuntimeDefaultUnconfinedLocalhost |
| podSecurityContext.seccompProfile.localhostProfile | string | - | Chart configuration parameter |
Container Security(7)
| Parameter | Type | Default | Description |
|---|---|---|---|
| securityContext.runAsUser | integer | - | Chart configuration parameter |
| securityContext.runAsGroup | integer | - | Chart configuration parameter |
| securityContext.runAsNonRoot | boolean | - | Chart configuration parameter |
| securityContext.allowPrivilegeEscalation | boolean | - | Chart configuration parameter |
| securityContext.readOnlyRootFilesystem | boolean | - | Chart configuration parameter |
| securityContext.capabilities.drop | array | - | Chart configuration parameter |
| securityContext.capabilities.add | array | - | Chart configuration parameter |
Pod Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podLabels | object | - | Extra labels for pods |
Pod Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podAnnotations | object | - | Extra annotations for pods |
Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| annotations | object | - | Extra annotations for all resources |
Node Selector(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nodeSelector | object | - | Node selector for pod scheduling |
Tolerations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| tolerations | array | - | Tolerations for pod scheduling |
Affinity(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| affinity | object | - | Affinity rules for pod scheduling |
Topology Spread Constraints(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| topologySpreadConstraints | array | - | Topology spread constraints for pod scheduling |
Priority Class Name(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| priorityClassName | string | - | Priority class name for pods |
Termination Grace Period Seconds(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| terminationGracePeriodSeconds | integer | - | Termination grace period in seconds |
Extra Env(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraEnv | array | - | Extra environment variables for Kafka containers |
Extra Init Containers(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraInitContainers | array | - | Extra init containers for Kafka pods (in addition to built-in init containers) |
Extra Volume Mounts(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumeMounts | array | - | Extra volume mounts for Kafka containers |
Extra Volumes(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumes | array | - | Extra volumes for Kafka pods |
Extra Manifests(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraManifests | array | - | Arbitrary extra manifests rendered with tpl |
Automount Service Account Token(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| automountServiceAccountToken | boolean | false | Mount the ServiceAccount token in Kafka pods |
No schema parameters match your search
Try searching for a different keyword or reset the filter.