Charts: Helm install stable/prometheus-operator FAILS

Created on 26 Feb 2019  Â·  17Comments  Â·  Source: helm/charts

➜ charts git:(master) ✗ helm install --name prometheus-operator stable/prometheus-operator --namespace monitoring
Error: found in requirements.yaml, but missing in charts/ directory: kube-state-metrics, prometheus-node-exporter, grafana

This is the error which i am getting while creating prometheus-operator
please help !! thank u

Most helpful comment

  • helm dependency update

All 17 comments

when i try to install
-> helm install stable/prometheus-operator

Error: object is being deleted: customresourcedefinitions.apiextensions.k8s.io "alertmanagers.monitoring.coreos.com" already exists , even i try deleting it says the same error

This is an old issue and one caused by Helm itself, rather than this chart https://github.com/helm/charts/issues/9241

There is a link to a work-around from that issue also as well as a PR for Helm to try addressing it in a later version

i tried word-around but still shows the above error @vsliouniaev

➜ charts git:(master) ✗ helm version
Client: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.10.0", GitCommit:"9ad53aac42165a5fadc6c87be0dea6b115f93090", GitTreeState:"clean"}
should i upgrade helm ?

All versions of helm to date suffer from this bug.
You will need to create the 4 prometheus operator CRDs first, then disable their provisioning via the chart as in the workaround.
If you have already tried to deploy the chart once one or more CRDs will exist in the cluster already

Deploy CRDs used by Prometheus Operator.

createCustomResource: false

changed this in values.yaml

I do not understand, did this solve your issue or are you asking for more information?

sorry for confusing i changed "createCustomResource: true " to "createCustomResource: false" in value.yaml then tried installing but it shows issue:
➜ charts git:(master) ✗ helm install stable/prometheus-operator
Error: found in requirements.yaml, but missing in charts/ directory: kube-state-metrics, prometheus-node-exporter, grafana

@vsliouniaev

worked ...thank you @vsliouniaev

  • helm dependency update

Hi,
still have a similar issue with helm 2.14

$ helm version
Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}



md5-c3b00fb2c6ca943a8f123f0a16e5bdc7



$ kubectl delete crd/alertmanagers.monitoring.coreos.com crd/prometheuses.monitoring.coreos.com crd/prometheusrules.monitoring.coreos.com crd/servicemonitors.monitoring.coreos.com
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "alertmanagers.monitoring.coreos.com" not found
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "prometheuses.monitoring.coreos.com" not found
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "prometheusrules.monitoring.coreos.com" not found
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "servicemonitors.monitoring.coreos.com" not found



md5-c3b00fb2c6ca943a8f123f0a16e5bdc7



$ helm install stable/prometheus-operator
Error: validation failed: [unable to recognize "": no matches for kind "Alertmanager" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "PrometheusRule" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"]
$ helm install stable/prometheus-operator
Error: object is being deleted: customresourcedefinitions.apiextensions.k8s.io "alertmanagers.monitoring.coreos.com" already exists
$ 
$ helm install stable/prometheus-operator
Error: object is being deleted: customresourcedefinitions.apiextensions.k8s.io "prometheuses.monitoring.coreos.com" already exists
$ helm install stable/prometheus-operator
Error: object is being deleted: customresourcedefinitions.apiextensions.k8s.io "alertmanagers.monitoring.coreos.com" already exists



md5-62e9e409e80d086e7d1ce2ded7861fa0



$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml
customresourcedefinition.apiextensions.k8s.io/alertmanagers.monitoring.coreos.com created
ronank@superkube01:~$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml
customresourcedefinition.apiextensions.k8s.io/prometheuses.monitoring.coreos.com created
ronank@superkube01:~$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml
customresourcedefinition.apiextensions.k8s.io/prometheusrules.monitoring.coreos.com created
ronank@superkube01:~$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml
customresourcedefinition.apiextensions.k8s.io/servicemonitors.monitoring.coreos.com created



md5-c3b00fb2c6ca943a8f123f0a16e5bdc7



$ helm install stable/prometheus-operator --set prometheusOperator.createCustomResource=false --no-crd-hook
Error: validation failed: [unable to recognize "": no matches for kind "Alertmanager" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "PrometheusRule" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"]

Even by launching the command a couple of time, and/or waiting between them.

Any advise ?

Thanks

It's interesting that you're still seeing this with 1.14. I haven't been able to validate this issue one way or the other. I suggest you wait some time after creating the CRDs for them to become fully available and then run the helm install.
You should be able to kubectl get them in a loop until they are available, then install the chart.
Here is another discussion about the issue: https://github.com/coreos/prometheus-operator/issues/1866

I did have the same issue which was:

Error: found in requirements.yaml, but missing in charts/ directory: kube-state-metrics, prometheus-node-exporter, grafana

Going to dir stable/prometheus-operator and run

helm dep update

Solve the issue.

This cleaned up for me and I was able to install the operator

kubectl get crd | grep monitoring | awk 'BEGIN { FS = " " } { print $1 }' | ( while read line
  do
    kubectl delete crd ${line}
  done
  )
  • helm dependency update
  • helm dependency update

this was what fixed it for me...thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings