Search code examples
kubernetes-helmpersistent-volumeszeebe

How to write helm hook to delete persistent volumes


I am new to k8s and helm. I am deploying an open source distributed software called zeebe that provides helm charts for k8s deployment. I have seen that even after executing the helm uninstall command the persistent volume claims and persistent volumes do not get deleted.

A workaround is stated on this helm github issue to define a helm hook. Being new to helm I cannot find an example to try this out. The only file that I have been editing so far when installing and uninstalling helm chart is the values.yaml file. Kindly guide me on how and where to write an helm hook for zeebe deployment to delete its persistent volumes on helm uninstall.

Thanks.


Solution

  • I finally found a solution to this. All pv and pvc could be deleted through kubectl delete pvc -l app=camunda-platform command