Interview Prep/Kubernetes/Helm, operators and GitOps

You want to uninstall a Helm release but keep the PVCs. How?

BeginnerScenarioHelm, operators and GitOps
Answer

Situation read → Data must survive an uninstall.

What I'd do →

  1. Check how PVCs were created (chart template versus StatefulSet volumeClaimTemplates)
  2. StatefulSet PVCs survive helm uninstall
  3. Annotate chart-managed PVCs with helm.sh/resource-policy: keep
  4. Verify with kubectl get pvc after uninstall
  5. Back up first

Why → The keep policy tells Helm not to delete a resource on uninstall.

Interview tip → Always back up before uninstall.

All Kubernetes questions Roadmap: Platform engineering

More on Helm, operators and GitOps