// This assembly is included in the following assemblies:
//
// assembly-config-kafka.adoc

[id='scaling-clusters-{context}']
= Scaling clusters

[role="_abstract"]
Scale Kafka clusters by adding or removing brokers.
If a cluster already has topics defined, you also have to reassign partitions.

You use the `kafka-reassign-partitions.sh` tool to reassign partitions.
The tool uses a reassignment JSON file that specifies the topics to reassign.

You can generate a reassignment JSON file or create a file manually if you want to move specific partitions.

include::../../modules/configuring/con-scaling-kafka-clusters.adoc[leveloffset=+1]

include::../../modules/configuring/con-partition-reassignment.adoc[leveloffset=+1]

include::../../modules/configuring/proc-generating-reassignment-json-files.adoc[leveloffset=+1]

include::../../modules/configuring/proc-scaling-up-a-kafka-cluster.adoc[leveloffset=+1]

include::../../modules/configuring/proc-scaling-down-a-kafka-cluster.adoc[leveloffset=+1]
