---
title: Charmhub | Deploy Kafka Bundle using Charmhub - The Open Operator Collection
description: Deploy the latest version of Kafka Bundle on any cloud.
url: https://charmhub.io/kafka-bundle/configurations/kafka
---

##### We've discontinued the registration of new Bundles

New Bundle registrations are no longer accepted. Existing bundles remain functional. We recommend using the Juju Terraform Provider for new deployments.

[Learn more](https://discourse.charmhub.io/t/discontinuing-new-charmhub-bundle-registrations/15344)

# Kafka Bundle

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
| bundle

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
  | bundle
* [Databases](https://charmhub.io/?filter=databases)

Platform:

stable 3

```
juju deploy kafka-bundle
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [Kafka](https://charmhub.io/kafka-bundle/configurations/kafka)
* [Zookeeper](https://charmhub.io/kafka-bundle/configurations/zookeeper)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* certificate-extra-sans | string

  Config options to add extra-sans to the ones used when requesting server certificates. The extra-sans are specified by comma-separated names to be added when requesting signed certificates. Use "{unit}" as a placeholder to be filled with the unit number, e.g. "worker-{unit}" will be translated as "worker-0" for unit 0 and "worker-1" for unit 1 when requesting the certificate.
* compression-type | string

  Default: producer

  Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer.
* cruisecontrol-balance-threshold | float

  Default: 1.1

  The maximum allowed extent of unbalance between brokers for cpu, disk and network utilization, and replica counts. For example, a value of `1.1` ensures that no broker should have >1.1x average utilization of all the brokers
* cruisecontrol-capacity-threshold | float

  Default: 0.8

  The maximum percentage of the total cpu, disk and network capacity that is allowed to be used on a broker. For example, a value of `0.8` ensures that no broker should have >80% utilization
* expose-external | string

  Default: nodeport

  String to determine how to expose the Apache Kafka cluster externally from the Kubernetes cluster. Possible values: 'nodeport', 'none'
* extra-listeners | string

  Config options to add extra SANs to the ones used when requesting server certificates, and to define custom `advertised.listeners` and ports for clients external to the Juju model. These items are comma-separated. Use '{unit}' as a placeholder to be filled with the unit number if necessary. For port allocations, providing the port for a given listener will offset the generated port number by that amount, with an accepted value range of 20001-50000. For example, a provided value of 'worker-{unit}.domain.com:30000' will generate listeners for unit 0 with name 'worker-0.domain.com', and be allocated ports 39092, 39093 etc for each authentication scheme.
* log-cleaner-delete-retention-ms | string

  Default: 86400000

  How long are delete records retained.
* log-cleaner-min-compaction-lag-ms | string

  Default: 0

  The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted.
* log-cleanup-policy | string

  Default: delete

  The default cleanup policy for segments beyond the retention window. A comma separated list of valid policies. Valid policies are: 'delete' and 'compact'
* log-flush-interval-messages | string

  Default: 9223372036854775807

  The number of messages accumulated on a log partition before messages are flushed to disk.
* log-flush-interval-ms | string

  Default: 9223372036854775807

  The maximum time in ms that a message in any topic is kept in memory before flushed to disk.
* log-flush-offset-checkpoint-interval-ms | int

  Default: 60000

  The frequency with which we update the persistent record of the last flush which acts as the log recovery point.
* log-level | string

  Default: INFO

  Level of logging for the different components operated by the charm. Possible values: ERROR, WARNING, INFO, DEBUG
* log-message-timestamp-type | string

  Default: CreateTime

  Define whether the timestamp in the message is message create time or log append time. The value should be either 'CreateTime' or 'LogAppendTime'.
* log-retention-bytes | string

  Default: -1

  The maximum size of the log before deleting it.
* log-retention-ms | string

  Default: -1

  The number of milliseconds to keep a log file before deleting it (in milliseconds).
* log-segment-bytes | int

  Default: 1073741824

  The maximum size of a single log file.
* message-max-bytes | int

  Default: 1048588

  The largest record batch size allowed by Apache Kafka (after compression if compression is enabled). If this is increased and there are consumers older than 0.10.2, the consumers' fetch size must also be increased so that they can fetch record batches this large. In the latest message format version, records are always grouped into batches for efficiency. In previous message format versions, uncompressed records are not grouped into batches and this limit only applies to a single record in that case.This can be set per topic with the topic level max.message.bytes config.
* network-bandwidth | int

  Default: 50000

  The network bandwidth available for the cloud that the charm is deployed to, in KB.
* offsets-topic-num-partitions | int

  Default: 50

  The number of partitions for the offset commit topic (should not change after deployment).
* pause-after-unit-refresh | string

  Default: none

  Wait for manual confirmation to resume refresh after these units refresh
  Allowed values: "all", "first", "none"
* profile | string

  Default: production

  Profile representing the scope of deployment, and used to enable high-level customisation of sysconfigs, resource checks/allocation, warning levels, etc. Allowed values are: “production”, “staging” and “testing”
* replication-quota-window-num | int

  Default: 11

  The number of samples to retain in memory for replication quotas.
* roles | string

  Default: broker

  Comma separated list of the roles assigned to the nodes of this cluster.
  This configuration accepts the following roles: 'broker' (standard functionality), 'balancer' (cruise control), 'controller' (KRaft mode).
* ssl-cipher-suites | string

  A list of cipher suites. This is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol. By default all the available cipher suites are supported.
* ssl-principal-mapping-rules | string

  Default: DEFAULT

  A list of rules for mapping from distinguished name from the client certificate to short name. Each rule starts with 'RULE:' and contains an expression as the following. 'RULE:pattern/replacement/[LU]'. A valid set of rules could look something like this 'RULE:^.\*[Cc][Nn]=([a-zA-Z0-9.-\_@]\*).\*$/$1/L,DEFAULT'
* system-users | string

  User-provided secret ID which defines internal username/passwords on the Apache Kafka cluster.
  The secret ID format is like "secret:cvh7kruupa1s46bqvuig" and should not be confused with secret name or label.
  The secret could be defined using `juju add-secret <secret-name> <user>=<admin-password>` command, where `<user>` is one of the internal users defined by the charm: `sync` or `admin`.
  The `juju add-secret` command will output the secret ID, which can then be granted to the charm and configured using `juju config` command.
* tls-private-key | string

  User-provided secret ID which defines internal TLS/SSL private-key to be used by individual brokers in the Apache Kafka cluster.
  The secret ID format is like "secret:cvh7kruupa1s46bqvuig" and should not be confused with secret name or label.
  The secret could be defined using `juju add-secret <secret-name> <unit-name>=<tls-private-key>` command, where `<unit-name>` is the Juju unit-id for a specific Kafka unit with a hyphen, e.g `kafka/3` -> `kafka-3`. `tls-private-key` can be raw-string, or base64 encoded.
  The `juju add-secret` command will output the secret ID, which can then be granted to the charm and configured using `juju config` command.
* transaction-state-log-num-partitions | int

  Default: 50

  The number of partitions for the transaction topic (should not change after deployment).
* unclean-leader-election-enable | boolean

  Indicates whether to enable replicas not in the ISR set to be elected as leader as a last resort, even though doing so may result in data loss.
