我正在使用crunchydata/postgres运算符进行基于k3s的设置,但由于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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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/controller-runtime@v0.8.3/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
解决此问题的正确方法是什么?我尝试了以下位置提供的舵图:https://github.com/CrunchyData/postgres-operator-examples但仍然没有成功。
感谢
我通过在Kubernetes版本上设置旧版本来解决这个问题。我正在使用k3sup install
安装集群,所以我只是添加了版本作为命令的一部分,如k3sup install --k3s-channel v1.24