// Module included in the following assemblies:
//
// managing/assembly-rolling-updates.adoc

[id='proc-manual-rolling-update-statefulset-{context}']
= Performing a rolling update using a pod management annotation

[role="_abstract"]
This procedure describes how to trigger a rolling update of a Kafka cluster or ZooKeeper cluster.

To trigger the update, you add an annotation to the resource you are using to manage the pods running on the cluster.
You annotate the `StatefulSet` or `StrimziPodSet` resource (if you enabled the xref:ref-operator-use-strimzi-pod-sets-feature-gate-{context}[UseStrimziPodSets feature gate]).

.Procedure

. Find the name of the resource that controls the Kafka or ZooKeeper pods you want to manually update.
+
For example, if your Kafka cluster is named _my-cluster_, the corresponding names are _my-cluster-kafka_ and _my-cluster-zookeeper_.

. Use `kubectl annotate` to annotate the appropriate resource in Kubernetes.
+
.Annotating a StatefulSet
[source,shell,subs=+quotes]
----
kubectl annotate statefulset _<cluster_name>_-kafka strimzi.io/manual-rolling-update=true

kubectl annotate statefulset _<cluster_name>_-zookeeper strimzi.io/manual-rolling-update=true
----
+
.Annotating a StrimziPodSet
[source,shell,subs=+quotes]
----
kubectl annotate strimzipodset _<cluster_name>_-kafka strimzi.io/manual-rolling-update=true

kubectl annotate strimzipodset _<cluster_name>_-zookeeper strimzi.io/manual-rolling-update=true
----

. Wait for the next reconciliation to occur (every two minutes by default).
A rolling update of all pods within the annotated resource is triggered, as long as the annotation was detected by the reconciliation process.
When the rolling update of all the pods is complete, the annotation is removed from the resource.
