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

[id='assembly-upgrading-kafka-versions-{context}']

= Upgrading Kafka

After you have upgraded your Cluster Operator to {ProductVersion}, the next step is to upgrade all Kafka brokers to the latest supported version of Kafka.

Kafka upgrades are performed by the Cluster Operator through rolling updates of the Kafka brokers.

The Cluster Operator initiates rolling updates based on the Kafka cluster configuration.

[cols="2*",options="header",stripes="none",separator=¦]
|===

¦If `Kafka.spec.kafka.config` contains...
¦The Cluster Operator initiates...

¦Both the `inter.broker.protocol.version` and the `log.message.format.version`.
¦A single rolling update. After the update, the `inter.broker.protocol.version` must be updated manually, followed by `log.message.format.version`.
Changing each will trigger a further rolling update.

¦Either the `inter.broker.protocol.version` or the `log.message.format.version`.
¦Two rolling updates.

¦No configuration for the `inter.broker.protocol.version` or the `log.message.format.version`.
¦Two rolling updates.

|===

As part of the Kafka upgrade, the Cluster Operator initiates rolling updates for ZooKeeper.

* A single rolling update occurs even if the ZooKeeper version is unchanged.
* Additional rolling updates occur if the new version of Kafka requires a new ZooKeeper version.

.Additional resources

* xref:proc-upgrading-the-co-{context}[]
* xref:ref-kafka-versions-{context}[]

include::modules/ref-upgrade-kafka-versions.adoc[leveloffset=+1]

//strategies for upgrading clients - concept
include::modules/con-upgrade-strategies-for-upgrading-clients.adoc[leveloffset=+1]

include::modules/con-upgrade-versions-and-images.adoc[leveloffset=+1]

include::modules/proc-upgrade-brokers-newer-kafka.adoc[leveloffset=+1]
