No matches for kind "PerconaServerMongoDB" in version "psmdb.percona.com/v1-12-0"

I have the Percona Server for MongoDB operator installed in our cluster (version 1.12.0) and I am now trying to install Percona Server for MongoDB and getting this error:

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: unable to recognize “”: no matches for kind “PerconaServerMongoDB” in version “psmdb.percona.com/v1-12-0

I have uninstalled and re-installed the operator and I am installing percona server for mongodb with default helm chart options - I’m not even customizing anything.

If I do a kubectl get PerconaServerMongoDB I don’t see anything. What creates that? The operator? If so why would the operator install successfully but not install the custom resource?

1 Like

I got logs on the operator and see this:

{“level”:“error”,“ts”:1653068179.3692636,“logger”:“controller-runtime.source”,“msg”:“if kind is a CRD, it should be installed before calling Start”,“kind”:“PerconaServerMongoDB.psmdb.percona.com”,“error”:"no matches for kind “PerconaServerMongoDB” in version “psmdb.percona.com/v1-12-0"”,“stacktrace”:“sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:137\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:233\nk8s.io/apimachinery/pkg/util/wait.poll\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:580\nk8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:545\nsigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1\n\t/go/src/github.com/percona/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:131”}

1 Like

I ended up using:

wget https://raw.githubusercontent.com/percona/percona-helm-charts/main/charts/psmdb-operator/crds/crd.yaml

kubectl delete -f crd.yml
kubectl create -f crd.yml

Then installing the operator, then installing the percona mongo db helm chart. That seemed to work. :crazy_face:

1 Like

Hello @Brad_Baker1 ,

I’m not sure what was happening here. Seems that you were using a CRD of older version, but trying to apply the CR of the newer one.

Just get the CRD and CR from the same branch:

git clone -b v1.12.0 https://github.com/percona/percona-server-mongodb-operator
1 Like