// Module included in the following assemblies:
//
// assembly-kafka-broker-replicas.adoc

[id='proc-configuring-kafka-broker-replicas-{context}']
= Configuring the number of broker nodes

This procedure describes how to configure the number of Kafka broker nodes in a new cluster.
It only applies to new clusters with no partitions.
If your cluster already has topics defined, see
xref:scaling-clusters-{context}[].

.Prerequisites

* A Kubernetes cluster
* A running Cluster Operator
* A Kafka cluster with no topics defined yet

.Procedure

. Edit the `replicas` property in the `Kafka` resource.
For example:
+
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    # ...
    replicas: 3
    # ...
  zookeeper:
    # ...
----
+
. Create or update the resource.
+
This can be done using `kubectl apply`:
[source,shell,subs=+quotes]
kubectl apply -f _your-file_

.Additional resources
If your cluster already has topics defined, see
xref:scaling-clusters-{context}[].
