// Module included in the following assemblies:
//
// assembly-deployment-configuration.adoc

[id='proc-manual-delete-pod-pvc-zookeeper-{context}']
= Deleting Zookeeper nodes manually

This procedure describes how to delete an existing Zookeeper node by using an {ProductPlatformName} annotation.
Deleting a Zookeeper node consists of deleting both the `Pod` on which Zookeeper 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.

WARNING: Deleting a `PersistentVolumeClaim` can cause permanent data loss. The following procedure should only be performed if you have encountered storage issues.

.Prerequisites

* A running Zookeeper cluster.
* A running Cluster Operator.

.Procedure

. Find the name of the `Pod` that you want to delete.

For example, if the cluster is named _cluster-name_, the pods are named _cluster-name_-zookeeper-_index_, where _index_ starts at zero and ends at the total number of replicas.

. Annotate the `Pod` resource in {ProductPlatformName}.
+
ifdef::Kubernetes[]
On {KubernetesName} use `kubectl annotate`:
[source,shell,subs=+quotes]
kubectl annotate pod _cluster-name_-zookeeper-_index_ operator.strimzi.io/delete-pod-and-pvc=true
endif::Kubernetes[]
+
On {OpenShiftName} use `oc annotate`:
[source,shell,subs=+quotes]
oc annotate pod _cluster-name_-zookeeper-_index_ operator.strimzi.io/delete-pod-and-pvc=true
+
. Wait for the next reconciliation, when the annotated pod with the underlying persistent volume claim will be deleted and then recreated.

.Additional resources

* For more information about deploying the Cluster Operator, see xref:cluster-operator-str[].
* For more information about deploying the Zookeeper cluster, see xref:deploying-kafka-cluster-openshift-str[] and xref:deploying-kafka-cluster-kubernetes-str[].