Helm-charts: prometheus-kube-stack Unable to convert to CRD type.

Created on 12 Oct 2020  路  3Comments  路  Source: prometheus-community/helm-charts

Describe the bug
I am using the prometheus-kube-stack helm chart to deploy the Prometheus operator and the deployment works as expected in a new cluster. But when trying to deploy the chart in an existing cluster I am getting the following error:

Error: unable to convert to CRD type: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:65"

I made sure to have deleted all existing Prometheus Operator crds before deploying the chart.

Deploying the CRDs manually in the cluster is working as expected.

Version of Helm and Kubernetes:

Helm Version:

$ helm version
Client: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}

Kubernetes Version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.4", GitCommit:"c96aede7b5205121079932896c4ad89bb93260af", GitTreeState:"clean", BuildDate:"2020-06-18T02:59:13Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.12", GitCommit:"5ec472285121eb6c451e515bc0a7201413872fa3", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:12Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

Which chart:
Which version of the chart: 9.4.4

What happened:
The Prometheus operator is not deployed. Getting error:

Error: unable to convert to CRD type: no kind "CustomResourceDefinition" is registered for version "apiextensions.k8s.io/v1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:65"

What you expected to happen:
The Prometheus Operator to be deployed.

bug

All 3 comments

FYI this is connected to this issue -> https://github.com/helm/helm/issues/6783
Helm2 crd hook does not support apiVersion: apiextensions.k8s.io/v1 which is used in the 0.42 Prometheus operator release. Using a previous version for now that is using apiVersion: apiextensions.k8s.io/v1beta1 is a way to overcome this issue until we migrate to Helm3.
Closing the Issue.

Let's see whether the fix for Helm can be released in the upcoming v2.17.

Regrettably - it did not - but at least we've tried.
For reference purposes: https://github.com/helm/helm/issues/6783#issuecomment-674171578

Was this page helpful?
0 / 5 - 0 ratings