Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "prometheus-kube

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "prometheus-kube-state-metrics" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "monitoring": current value is "monitoring-kogito-poc"

How to resolve this I have deleted the namespace and created new namespace and trying to install helm charts for grafana and prometheus. But it couldn't allowed me to install. I have deleted clusterrolebinding to for all below enter image description here

kubectl delete clusterrolebinding prometheus-kube-state-metrics [enter image description here][1]

but it still showing and notable install prometheus [1]: https://i.sstatic.net/QkNaS.png

like image 215
user20094361 Avatar asked Dec 06 '25 17:12

user20094361


1 Answers

It was not enough just to delete the role binding. I had to also delete the role itself.

kubectl delete clusterrole prometheus-kube-state-metrics

Furthermore I deleted all other prometheus-relevant role bindings and roles, too:

  • prometheus-alertmanager
  • prometheus-pushgateway
  • prometheus-server
  • system:prometheus

Finally I re-ran the installation and it worked.

like image 200
ostmond Avatar answered Dec 08 '25 14:12

ostmond