[英]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;无法继续安装:命名空间“”中的 ClusterRole“prometheus-kube-state-metrics”存在并且无法导入到当前版本中:所有权元数据无效; annotation validation error: key "meta.helm.sh/release-namespace" must equal "monitoring": current value is "monitoring-kogito-poc"注释验证错误:键“meta.helm.sh/release-namespace”必须等于“monitoring”:当前值为“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.如何解决这个问题我删除了命名空间并创建了新的命名空间,并尝试为 grafana 和 prometheus 安装 helm 图表。 But it couldn't allowed me to install.但它不允许我安装。 I have deleted clusterrolebinding to for all below enter image description here我已经为下面的所有内容删除了 clusterrolebinding enter image description here
kubectl delete clusterrolebinding prometheus-kube-state-metrics [enter image description here][1] kubectl delete clusterrolebinding prometheus-kube-state-metrics [在此处输入图像描述][1]
but it still showing and notable install prometheus [1]: https://i.stack.imgur.com/QkNaS.png但它仍然显示并值得注意安装普罗米修斯 [1]: https://i.stack.imgur.com/QkNaS.png
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:此外,我也删除了所有其他与普罗米修斯相关的角色绑定和角色:
Finally I re-ran the installation and it worked.最后我重新运行安装,它成功了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.