helm: Helm 3: Not able to install chart with custom resource yaml

Output of helm version:

version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"1b77848c89e8df414aea055cca5d1a1997a62f0c", GitTreeState:"dirty"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-26T00:05:06Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.8-gke.6", GitCommit:"394ee507d00f15a63cef577a14026096c310698e", GitTreeState:"clean", BuildDate:"2019-03-30T19:31:43Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): GKE

I tried to install a redis chart which has a custom resource and the k8s cluster has the CRD for the custom resource, but I still get this error. Didn’t face this issue with helm v2 though

$ helm install test-helm3 redis
Error: apiVersion "monitoring.coreos.com/v1" in redis/templates/servicemonitor.yaml is not available
$ kubectl get crd
NAME                                    CREATED AT
alertmanagers.monitoring.coreos.com     2018-12-31T13:08:14Z                                                  
backendconfigs.cloud.google.com         2018-09-21T10:35:53Z                                                  
prometheuses.monitoring.coreos.com      2018-12-31T13:08:14Z                                                  
prometheusrules.monitoring.coreos.com   2018-12-31T13:08:15Z                                                  
scalingpolicies.scalingpolicy.kope.io   2018-09-21T10:36:22Z                                                  
servicemonitors.monitoring.coreos.com   2018-12-31T13:08:14Z

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 18 (14 by maintainers)

Most upvoted comments

Any update on this? This is likely blocking many users of prometheus-operator from using helm3.

I was able to reproduce the issue with both the cert-manager and prometheus-operator charts, however, it looks like it’s just a short-lived temporary error. It takes some time for the CRDs to register with the API server. It took a few minutes on my test cluster. Once they were established, I could install both cert-manager and prometheus-operator.

For cert-manager, I used the following steps: https://github.com/jetstack/cert-manager/issues/1744#issuecomment-513349489

And for the prometheus-operator chart:

kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/podmonitor.crd.yaml

Wait a few minutes for the API server to register the CRDs, then

helm install prom stable/prometheus-operator

I hit a few validation errors, but point still stands 😃

This is a custom Redis chart that my team uses. But I can help you with reproducing this. I will come up with a basic set of steps to reproduce the exact issue or at least similar

On Mon, Apr 29, 2019, 4:45 PM Martin Hickey notifications@github.com wrote:

@karuppiah7890 https://github.com/karuppiah7890 To help reproduce this, what redis chart are you installing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/helm/helm/issues/5654#issuecomment-487541226, or mute the thread https://github.com/notifications/unsubscribe-auth/ADBXB2ELZIOPZYXTU6K6JHLPS3KFJANCNFSM4HI6MJPQ .