// Module included in the following assemblies:
//
// deploying/assembly-deploy-kafka-connect-managing-connectors.adoc

[id='proc-manual-restart-connector-task-{context}']
= Performing a restart of a Kafka connector task

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

.Prerequisites

* The Cluster Operator is running.

.Procedure

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

. Find the ID of the task to be restarted from the `KafkaConnector` custom resource.
Task IDs are non-negative integers, starting from 0.
+
[source,shell,subs="+quotes"]
----
kubectl describe KafkaConnector _KAFKACONNECTOR-NAME_
----

. To restart the connector task, annotate the `KafkaConnector` resource in Kubernetes.
For example, using `kubectl annotate` to restart task 0:
+
[source,shell,subs="+quotes"]
----
kubectl annotate KafkaConnector _KAFKACONNECTOR-NAME_ strimzi.io/restart-task=0
----

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