// Module included in the following assemblies:
//
// assembly-upgrade-resources.adoc

[id='proc-upgrade-kafka-api-version-{context}']
= Upgrading the API version of Kafka resources to {ApiVersion}

.Prerequisites

* A Cluster Operator supporting the `{ApiVersion}` API version is up and running.
* You have updated the following configurations within the `Kafka` custom resource:
** xref:proc-upgrade-zookeeper-api-version-{context}[ZooKeeper] 
** xref:proc-upgrade-topic-operator-api-version-{context}[Topic Operator]
** xref:proc-upgrade-entity-operator-api-version-{context}[Entity Operator]
** xref:proc-upgrade-cruise-control-api-version-{context}[Cruise Control] (if Cruise Control is deployed)

.Procedure
Perform the following steps for each `Kafka` custom resource in your deployment.

. Update the `Kafka` custom resource in an editor.
+
[source,shell,subs="+quotes,attributes"]
----
kubectl edit kafka _KAFKA-CLUSTER_
----

. Update the `apiVersion` of the `Kafka` custom resource to `{ApiVersion}`:
+
Replace:
+
[source,shell,subs="attributes"]
----
apiVersion: {KafkaApiVersionPrev}
----
+
with:
+
[source,shell,subs="attributes"]
----
apiVersion: {KafkaApiVersion}
----

. Save the file, exit the editor and wait for the updated custom resource to be reconciled.