:_mod-docs-content-type: PROCEDURE

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

[id='proc-manual-delete-pod-pvc-kafka-{context}']
= Deleting Kafka nodes using annotations

[role="_abstract"]
This procedure describes how to delete an existing Kafka node by using a Kubernetes annotation.
Deleting a Kafka node consists of deleting both the `Pod` on which the Kafka broker is running and the related `PersistentVolumeClaim` (if the cluster was deployed with persistent storage).
After deletion, the `Pod` and its related `PersistentVolumeClaim` are recreated automatically.

Use this procedure only after attempting non-destructive recovery actions.
For guidance on recovery options, see
xref:con-kafka-recovering-brokers-{context}[Recovering from broker storage issues].

WARNING: Deleting a `PersistentVolumeClaim` can cause permanent data loss and the availability of your cluster cannot be guaranteed.
The following procedure should only be performed if you have encountered storage issues.

.Prerequisites

* The Cluster Operator that manages the Kafka cluster is running.

.Procedure

. Find the name of the `Pod` that you want to delete.
+
Kafka broker pods are named `<cluster_name>-kafka-<index_number>`, where `<index_number>` starts at zero and ends at the total number of replicas minus one.
For example, `my-cluster-kafka-0`.

. Use `kubectl annotate` to annotate the `Pod` resource in Kubernetes:
+
[source,shell,subs="+quotes,attributes+"]
kubectl annotate pod <cluster_name>-kafka-<index_number> strimzi.io/delete-pod-and-pvc="true"

. Wait for the next reconciliation.
The annotated pod and its associated persistent volume claim are deleted and then recreated automatically.

