[Solved] Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize “”: no matches for kind “CustomResourceDefinition” in version “apiextensions.k8s.io/v1beta1”

My problem is that this error is reported when installing} Prometheus operator in k8s cluster

Cause of the problem

My cluster version is too high, version 1.22, and the name of the version after Prometheus operator has been changed. The old version is incompatible,

┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm  search repo prometheus-operator
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
ali/prometheus-operator         8.7.0           0.35.0          Provides easy monitoring definitions for Kubern...
azure/prometheus-operator       9.3.2           0.38.1          DEPRECATED Provides easy monitoring definitions...
┌──[[email protected]]-[~/ansible/k8s-helm-create]
└─$helm install liruilong  ali/prometheus-operator
Error: failed to install CRD crds/crd-alertmanager.yaml: unable to recognize "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
┌──[[email protected]]-[~/ansible/k8s-helm-create]

Solution:

With the new version of chart, GitHub’s address is:

https://github.com/prometheus-community/helm-charts/releases/download/kube-prometheus-stack-30.0.1/kube-prometheus-stack-30.0.1.tgz

Then, after all nodes are OK, change the SVC type and you can access it on the host

Similar Posts: