// Module included in the following assemblies:
// assembly-management-tasks.adoc

[id='proc-manual-restart-mirrormaker2-connector-{context}']
= Performing restarts of MirrorMaker 2 connectors using annotations

This procedure describes how to manually trigger a restart of a Kafka MirrorMaker 2 connector by using a Kubernetes annotation.

.Prerequisites

* The Cluster Operator is running.

.Procedure

. Find the name of the `KafkaMirrorMaker2` custom resource that controls the Kafka MirrorMaker 2 connector you want to restart:
+
[source,shell,subs="+quotes"]
----
kubectl get KafkaMirrorMaker2
----

. Find the name of the Kafka MirrorMaker 2 connector to be restarted from the `KafkaMirrorMaker2` custom resource.
+
[source,shell,subs="+quotes"]
----
kubectl describe KafkaMirrorMaker2 _KAFKAMIRRORMAKER-2-NAME_
----

. To restart the connector, annotate the `KafkaMirrorMaker2` resource in Kubernetes.
In this example, `kubectl annotate` restarts a connector named `+my-source->my-target.MirrorSourceConnector+`:
+
[source,shell,subs="+quotes"]
----
kubectl annotate KafkaMirrorMaker2 _KAFKAMIRRORMAKER-2-NAME_ "strimzi.io/restart-connector=my-source->my-target.MirrorSourceConnector"
----

. Wait for the next reconciliation to occur (every two minutes by default).
+
The Kafka MirrorMaker 2 connector is restarted, as long as the annotation was detected by the reconciliation process.
When the restart request is accepted, the annotation is removed from the `KafkaMirrorMaker2` custom resource.

[role="_additional-resources"]
.Additional resources

* xref:con-config-mirrormaker2-{context}[Kafka MirrorMaker 2 cluster configuration].
