I am trying to deploy Flink on Kubernetes using Helm.

The problem is when I try to delete the chart, there are configmaps (flink-cluster-dispatcher-leader, flink-cluster-restserver-leader ..) which are generated by FLink HA mode on kubernetes that can't be deleted.

Is there any solution to delete them when uninstalling the chart?

  • Perhaps install Flink in single namespace flink and once you decide to remove the deployment remove namespace. – Kyslik Jun 1 at 13:48
  • thanks for your response , but that's not possible in our infrastructure because we run multiple jobs using Flink job per cluster mode in the same namespace. – mark dev Jun 1 at 14:31
  • There are helm.sh/docs/topics/charts_hooks but that would mean that chart itself must template these in. – Kyslik Jun 1 at 14:33
  • So here i must execute the command "kubectl delete configmap -l someLables" in the hook itself. that's mean i have to have kubectl installed and configured to point to the kubernetes cluster which run the jobs. I don't know if that's possible but i would appreciate if you could give me some resources or examples in order to do it. – mark dev Jun 1 at 14:48
  • I am not 100% sure what Flink does; but it would help you if ownerReferences would be set by whatever pod / job creates the configmap perhaps try searching in documentation if there is a flag for it. Once the parent resource is gone the configmap would be garbage collected. As for helm chart hooks, the chart itself would need to add these hooks; not you. GC reference: kubernetes.io/docs/concepts/workloads/controllers/… – Kyslik Jun 1 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.