<p>I made a Kafka and zookeeper as a statefulset and exposed Kafka to the outside of the cluster. However, whenever I try to delete the Kafka statefulset and re-create one, the data seemed to be gone? (when I tried to consume all the message using <code>kafkacat</code>, the old messages seemed to be gone) even if it is using the same PVC and PV. I am currently using EBS as my persistent volume. </p>

<p>Can someone explain to me what is happening to PV when I delete the statefulset? Please help me.</p>

<p>I assume your scenario is that you have a statefulset which has got a persistentvolumeclaim definition in it - or it is just referencing an existing volume - and you try to delete it. </p>

<p>In this case the persistent volume will stay there. Also the pvc won't disappear;</p>

<p>This is so that you can, if you wanted to, remount the same volume to a different statefulset pod - or an update of the previous one thereof.</p>

<p>If you want to delete the persistent volume you should delete the pvc and the buond PVs will disappear.</p>
