Kafka broker rack awareness docs - index

Kafka Broker rack awareness Operator

Overview

This charm handles the configuration of the broker.rack setting for Kafka. It needs to be used alongside the Kafka operator.

Usage

Basic usage

The rack awareness Operator needs to be deployed to the same machine as the Kafka operator. First create a machine:


$ juju add-machine --series=jammy

Using juju status, get the number of the machine that was just created. If the model is empty it will be number 0.


$ juju deploy kafka --channel edge --to=0

$ juju deploy kafka-broker-rack-awareness --channel edge --to=0

Lastly, use config to set the broker.rack value:


$ juju config kafka-broker-rack-awareness broker-rack="my-value"

To watch the process, juju status can be used.

To specify different rack values, more than one rack awareness operator can be deployed. For example, if we have two brokers on a different zone each:


$ juju deploy kafka-broker-rack-awareness zone-one --channel edge --to=0 # machine of the first broker

$ juju deploy kafka-broker-rack-awareness zone-two --channel edge --to=1 # machine of the second broker

$ juju config zone-one broker-rack="zone-one"

$ juju config zone-two broker-rack="zone-two"