zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.37k stars 981 forks source link

Openshift 3.11 Postgres Operator not working #1310

Open Hiteshchaudhari1 opened 3 years ago

Hiteshchaudhari1 commented 3 years ago

Please, answer some short questions which should help us to understand your problem/question better?

time="2021-01-13T13:24:16Z" level=info msg="Spilo operator v1.6.0\n" time="2021-01-13T13:24:16Z" level=info msg="Fully qualified configmap name: database/postgres-operator" time="2021-01-13T13:24:16Z" level=info msg="Parse role bindings" pkg=controller time="2021-01-13T13:24:16Z" level=info msg="successfully parsed" pkg=controller time="2021-01-13T13:24:16Z" level=info msg="Listening to all namespaces" pkg=controller time="2021-01-13T13:24:16Z" level=error msg="could not create customResourceDefinition \"postgresqls.acid.zalan.do\": the server could not find the requested resource" pkg=controller time="2021-01-13T13:24:20Z" level=fatal msg="could not register Postgres CustomResourceDefinition: the server could not find the requested resource" pkg=controller

I already have deployed the "postgresqls.acid.zalan.do" deployed in my cluster 

$ kubectl get crd NAME CREATED AT operatorconfigurations.acid.zalan.do 2021-01-13T12:22:22Z postgresqls.acid.zalan.do 2021-01-13T13:17:49Z postgresteams.acid.zalan.do 2021-01-13T12:24:27Z


Can you suggest what am I doing wrong or is there a problem with version compatibility between the operator and the infrastructure? 

Thank you!
FxKu commented 3 years ago

Although the error doesn't talk about permissions. have you deployed the ClusterRoles for operator and database pods?

Does your environment support CRD v1 apiVersion?

Hiteshchaudhari1 commented 3 years ago

Find my ans to your question in bold.

Although the error doesn't talk about permissions. have you deployed the ClusterRoles for operator -- YES and database pods -- by fetching the CR config the database pod deployment is triggered right? in my case, Operator pod is not starting so eventually database pod is deployed either.

Does your environment support CRD v1 apiVersion? -- nope apiextensions.k8s.io/v1 is not suppported, it support apiextensions.k8s.io/v1beta1 apiversion for CRD in my environment. so I was deploying above mentioned CRD using apiversion apiextensions.k8s.io/v1beta1

FxKu commented 3 years ago

The operator of v1.6.0 uses the v1 apiVersion for creating and updating CRDs. I would say, either you update to a newer K8s version or use an older release.