I'm using crunchydata/postgres-operator for my k3s based setup however I have started getting error as below due to latest version on kubectl:
time="2022-10-28T20:49:40Z" level=debug msg="debug flag set to true" file="cmd/postgres-operator/main.go:68" func=main.main version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="metrics server is starting to listen" addr=":8080" file="sigs.k8s.io/[email protected]/pkg/log/deleg.go:130" func="log.(*DelegatingLogger).Info" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="starting controller runtime manager and will wait for signal to exit" file="cmd/postgres-operator/main.go:89" func=main.main version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="upgrade checking enabled" file="cmd/postgres-operator/main.go:94" func=main.main version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="starting metrics server" file="sigs.k8s.io/[email protected]/pkg/manager/internal.go:385" func="manager.(*controllerManager).serveMetrics.func2" path=/metrics version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="{\"pgo_versions\":[{\"tag\":\"v5.1.0\"},{\"tag\":\"v5.0.5\"},{\"tag\":\"v5.0.4\"},{\"tag\":\"v5.0.3\"},{\"tag\":\"v5.0.2\"},{\"tag\":\"v5.0.1\"},{\"tag\":\"v5.0.0\"}]}" X-Crunchy-Client-Metadata="{\"deployment_id\":\"4d3c5b1b-a13b-46a9-b07d-59dd0fa0205b\",\"kubernetes_env\":\"v1.25.3+k3s1\",\"pgo_clusters_total\":0,\"pgo_version\":\"5.2.0-0\",\"is_open_shift\":false}" file="internal/upgradecheck/http.go:181" func=upgradecheck.CheckForUpgradesScheduler version=5.2.0-0
time="2022-10-28T20:49:40Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:41Z" level=info msg="Starting EventSource" file="sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:165" func="controller.(*Controller).Start.func1" reconciler group=postgres-operator.crunchydata.com reconciler kind=PostgresCluster source="kind source: /, Kind=" version=5.2.0-0
time="2022-10-28T20:49:42Z" level=error msg="if kind is a CRD, it should be installed before calling Start" error="no matches for kind \"CronJob\" in version \"batch/v1beta1\"" file="sigs.k8s.io/[email protected]/pkg/log/deleg.go:144" func="log.(*DelegatingLogger).Error" kind=CronJob.batch version=5.2.0-0
panic: no matches for kind "CronJob" in version "batch/v1beta1"
goroutine 1 [running]:
main.assertNoError(...)
github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:41
main.main()
github.com/crunchydata/postgres-operator/cmd/postgres-operator/main.go:105 +0x570
What is the correct way to to resolve this? I tried helm chart provided at: https://github.com/CrunchyData/postgres-operator-examples but still no success.
Thanks
I have managed to resolve this issue by setting up old version on Kubernetes version. I'm installing cluster using
k3sup install
so I just added version as part of the command likek3sup install --k3s-channel v1.24