kafka
by Bitnami
Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications.
About this chart
Bitnami package for Apache Kafka
Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications.
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
TL;DR
helm install my-release oci://registry-1.docker.io/bitnamicharts/kafka
Tip: Did you know that this app is also available as a Kubernetes App on the Azure Marketplace? Kubernetes Apps are the easiest way to deploy Bitnami on AKS. Click here to see the listing on Azure Marketplace.
Looking to use Apache Kafka in production? Try VMware Tanzu Application Catalog, the commercial edition of the Bitnami catalog.
⚠️ Important Notice: Upcoming changes to the Bitnami Catalog
Beginning August 28th, 2025, Bitnami will evolve its public catalog to offer a curated set of hardened, security-focused images under the new Bitnami Secure Images initiative. As part of this transition:
- Granting community users access for the first time to security-optimized versions of popular container images.
- Bitnami will begin deprecating support for non-hardened, Debian-based software images in its free tier and will gradually remove non-latest tags from the public catalog. As a result, community users will have access to a reduced number of hardened images. These images are published only under the “latest” tag and are intended for development purposes
- Starting August 28th, over two weeks, all existing container images, including older or versioned tags (e.g., 2.50.0, 10.6), will be migrated from the public catalog (docker.io/bitnami) to the “Bitnami Legacy” repository (docker.io/bitnamilegacy), where they will no longer receive updates.
- For production workloads and long-term support, users are encouraged to adopt Bitnami Secure Images, which include hardened containers, smaller attack surfaces, CVE transparency (via VEX/KEV), SBOMs, and enterprise support.
These changes aim to improve the security posture of all Bitnami users by promoting best practices for software supply chain integrity and up-to-date deployments. For more details, visit the Bitnami Secure Images announcement.
Introduction
This chart bootstraps a Kafka deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/kafka
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
These commands deploy Kafka on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Configuration and installation details
Listeners configuration
This chart allows you to automatically configure Kafka with 4 listeners:
- One for controller communications.
- A second one for inter-broker communications.
- A third one for communications with clients within the K8s cluster.
- (optional) a forth listener for communications with clients outside the K8s cluster. Check this section for more information.
For more complex configurations, set the listeners, advertisedListeners and listenerSecurityProtocolMap parameters as needed.
Enable security for Kafka
You can configure different authentication protocols for each listener you configure in Kafka. For instance, you can use sasl_tls authentication for client communications, while using tls for controller and inter-broker communications. This table shows the available protocols and the security they provide:
| Method | Authentication | Encryption via TLS |
|---|---|---|
| plaintext | None | No |
| tls | None | Yes |
| mtls | Yes (two-way authentication) | Yes |
| sasl | Yes (via SASL) | No |
| sasl_tls | Yes (via SASL) | Yes |
Configure the authentication protocols for client, controller and inter-broker communications by setting the listeners.client.protocol, listeners.controller.protocol and listeners.interbroker.protocol parameters to the desired ones, respectively.
If you enabled SASL authentication on any listener, you can set the SASL credentials using the parameters below:
sasl.client.users/sasl.client.passwords: when enabling SASL authentication for communications with clients.sasl.interbroker.user/sasl.interbroker.password: when enabling SASL authentication for inter-broker communications.sasl.controller.user/sasl.controller.password: when enabling SASL authentication for controller communications.
In order to configure TLS authentication/encryption, you can create a secret per Kafka node you have in the cluster containing the Java Key Stores (JKS) files: the truststore (kafka.truststore.jks) and the keystore (kafka.keystore.jks). Then, you need pass the secret names with the tls.existingSecret parameter when deploying the chart.
Note: If the JKS files are password protected (recommended), you will need to provide the password to get access to the keystores. To do so, use the
tls.keystorePasswordandtls.truststorePasswordparameters to provide your passwords.
For instance, to configure TLS authentication on a Kafka cluster with 2 Kafka nodes use the commands below to create the secrets:
kubectl create secret generic kafka-jks-0 --from-file=kafka.truststore.jks=./kafka.truststore.jks --from-file=kafka.keystore.jks=./kafka-0.keystore.jks
kubectl create secret generic kafka-jks-1 --from-file=kafka.truststore.jks=./kafka.truststore.jks --from-file=kafka.keystore.jks=./kafka-1.keystore.jks
Note: the command above assumes you already created the truststore and keystores files. This script can help you with the JKS files generation.
If, for some reason (like using CertManager) you can not use the default JKS secret scheme, you can use the additional parameters:
tls.jksTruststoreSecretto define additional secret, where thekafka.truststore.jksis being kept. The truststore password must be the same as intls.truststorePasswordtls.jksTruststoreKeyto overwrite the default value of the truststore key (kafka.truststore.jks).
Note: If you are using CertManager, particularly when an ACME issuer is used, the
ca.crtfield is not put in theSecretthat CertManager creates. To handle this, thetls.pemChainIncludedproperty can be set totrueand the initContainer created by this Chart will attempt to extract the intermediate certs from thetls.crtfield of the secret (which is a PEM chain) Note: The truststore/keystore from above must be protected with the same passwords set in thetls.keystorePasswordandtls.truststorePasswordparameters.
You can deploy the chart with authentication using the following parameters:
replicaCount=2
listeners.client.protocol=SASL
listeners.interbroker.protocol=TLS
tls.existingSecret=kafka-jks
tls.keystorePassword=jksPassword
tls.truststorePassword=jksPassword
sasl.client.users[0]=brokerUser
sasl.client.passwords[0]=brokerPassword
By setting the following parameter: listeners.client.protocol=SSL and listener.client.sslClientAuth=required, Kafka will require the clients to authenticate to Kafka brokers via certificate.
As result, we will be able to see in kafka-authorizer.log the events specific Subject: [...] Principal = User:CN=kafka,OU=...,O=...,L=...,C=..,ST=... is [...].
Update credentials
The Bitnami Kafka chart, when upgrading, reuses the secret previously rendered by the chart or the one specified in sasl.existingSecret. To update credentials, use one of the following:
- Run
helm upgradespecifying new credentials in thesaslsection as explained in the authentication section. - Run
helm upgradespecifying a new secret insasl.existingSecret
Accessing Kafka brokers from outside the cluster
In order to access Kafka Brokers from outside the cluster, an additional listener and advertised listener must be configured. Additionally, a specific service per kafka pod will be created.
There are three ways of configuring external access. Using LoadBalancer services, using NodePort services or using ClusterIP services.
Using LoadBalancer services
You have two alternatives to use LoadBalancer services:
- Option A) Use random load balancer IPs using an initContainer that waits for the IPs to be ready and discover them automatically.
externalAccess.enabled=true
externalAccess.broker.service.type=LoadBalancer
externalAccess.controller.service.type=LoadBalancer
externalAccess.broker.service.ports.external=9094
externalAccess.controller.service.ports.external=9094
defaultInitContainers.autoDiscovery.enabled=true
serviceAccount.create=true
broker.automountServiceAccountToken=true
controller.automountServiceAccountToken=true
rbac.create=true
Note: This option requires creating RBAC rules on clusters where RBAC policies are enabled.
- Option B) Manually specify the load balancer IPs:
externalAccess.enabled=true
externalAccess.controller.service.type=LoadBalancer
externalAccess.controller.service.containerPorts.external=9094
externalAccess.controller.service.loadBalancerIPs[0]='external-ip-1'
externalAccess.controller.service.loadBalancerIPs[1]='external-ip-2'
externalAccess.broker.service.type=LoadBalancer
externalAccess.broker.service.ports.external=9094
externalAccess.broker.service.loadBalancerIPs[0]='external-ip-3'
externalAccess.broker.service.loadBalancerIPs[1]='external-ip-4'
Note: You need to know in advance the load balancer IPs so each Kafka broker advertised listener is configured with it.
Following the aforementioned steps will also allow to connect the brokers from the outside using the cluster's default service (when service.type is LoadBalancer or NodePort). Use the property service.externalPort to specify the port used for external connections.
Using NodePort services
You have two alternatives to use NodePort services:
-
Option A) Use random node ports using an initContainer that discover them automatically.
externalAccess.enabled=true externalAccess.controller.service.type=NodePort externalAccess.broker.service.type=NodePort defaultInitContainers.autoDiscovery.enabled=true serviceAccount.create=true rbac.create=trueNote: This option requires creating RBAC rules on clusters where RBAC policies are enabled.
-
Option B) Manually specify the node ports:
externalAccess.enabled=true externalAccess.controller.service.type=NodePort externalAccess.controller.service.nodePorts[0]='node-port-1' externalAccess.controller.service.nodePorts[1]='node-port-2'Note: You need to know in advance the node ports that will be exposed so each Kafka broker advertised listener is configured with it.
The pod will try to get the external ip of the node using
curl -s https://ipinfo.io/ipunlessexternalAccess.<controller|broker>.service.domainorexternalAccess.<controller|broker>.service.useHostIPsis provided. -
Option C) Manually specify distinct external IPs (using controller+broker nodes)
externalAccess.enabled=true externalAccess.controller.service.type=NodePort externalAccess.controller.service.externalIPs[0]='172.16.0.20' externalAccess.controller.service.externalIPs[1]='172.16.0.21' externalAccess.controller.service.externalIPs[2]='172.16.0.22'Note: You need to know in advance the available IP of your cluster that will be exposed so each Kafka broker advertised listener is configured with it.
Using ClusterIP services
Note: This option requires that an ingress is deployed within your cluster
externalAccess.enabled=true
externalAccess.controller.service.type=ClusterIP
externalAccess.controller.service.ports.external=9094
externalAccess.controller.service.domain='ingress-ip'
externalAccess.broker.service.type=ClusterIP
externalAccess.broker.service.ports.external=9094
externalAccess.broker.service.domain='ingress-ip'
Note: the deployed ingress must contain the following block:
tcp:
9094: "{{ include "common.names.namespace" . }}/{{ include "common.names.fullname" . }}-0-external:9094"
9095: "{{ include "common.names.namespace" . }}/{{ include "common.names.fullname" . }}-1-external:9094"
9096: "{{ include "common.names.namespace" . }}/{{ include "common.names.fullname" . }}-2-external:9094"
Name resolution w
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkafka is pinned at v32.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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