Operator doesn't start with Kubernetes >1.22
rguichard opened this issue · 1 comments
rguichard commented
Hi folks,
extensions/v1beta1
has been removed in Kubernetes 1.22 and the Operator is looking for Ingress in this API group.
{"level":"debug","ts":1635628643.363504,"logger":"pomerium-operator","msg":"started with config","config":{"BaseConfigFile":"/etc/pomerium/config.yaml","Debug":true,"Election":true,"ElectionConfigMap":"pomerium-operator-election","ElectionNamespace":"default","IngressClass":"pomerium","MetricsAddress":":8080","HealthAddress":":8081","Namespace":"","PomeriumSecret":"pomerium","PomeriumNamespace":"default","PomeriumDeployments":["pomerium-authenticate","pomerium-authorize","pomerium-proxy","pomerium-databroker"],"ServiceClass":"pomerium"}}
{"level":"debug","ts":1635628643.3635736,"logger":"pomerium-operator","msg":"loading kubeconfig"}
{"level":"debug","ts":1635628643.3637104,"logger":"pomerium-operator","msg":"found kubeconfig","api-server":"https://10.96.0.1:443"}
{"level":"debug","ts":1635628643.3637228,"logger":"pomerium-operator","msg":"creating manager for operator","component":"operator"}
{"level":"debug","ts":1635628644.0723968,"logger":"pomerium-operator","msg":"manager created","component":"operator"}
{"level":"debug","ts":1635628644.7771401,"logger":"pomerium-operator","msg":"calling OnSave hooks","component":"configmanager"}
{"level":"debug","ts":1635628644.7772982,"logger":"pomerium-operator","msg":"adding controller","name":"pomerium-ingress","kind":""}
{"level":"debug","ts":1635628644.7773826,"logger":"pomerium-operator","msg":"adding controller","name":"pomerium-service","kind":""}
{"level":"info","ts":1635628644.777416,"logger":"pomerium-operator","msg":"starting manager","component":"operator"}
{"level":"info","ts":1635628644.7774415,"logger":"pomerium-operator","msg":"waiting for leadership","component":"operator"}
I1030 21:17:24.777737 1 leaderelection.go:242] attempting to acquire leader lease default/pomerium-operator-election...
I1030 21:17:41.859002 1 leaderelection.go:252] successfully acquired lease default/pomerium-operator-election
{"level":"debug","ts":1635628661.8591764,"logger":"pomerium-operator","msg":"updating config Secret","component":"configmanager"}
{"level":"debug","ts":1635628661.8657212,"logger":"pomerium-operator","msg":"update config Secret result","component":"configmanager","operation":"unchanged"}
{"level":"debug","ts":1635628662.5632472,"logger":"pomerium-operator","msg":"updating config Secret","component":"configmanager"}
{"level":"error","ts":1635628662.5631535,"logger":"pomerium-operator","msg":"could not start manager","component":"operator","error":"no matches for kind \"Ingress\" in version \"extensions/v1beta1\"","stacktrace":"github.com/pomerium/pomerium-operator/internal/operator.(*Operator).Start\n\t/build/internal/operator/operator.go:102\nmain.glob..func2\n\t/build/cmd/pomerium-operator/root.go:101\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895\nmain.main\n\t/build/cmd/pomerium-operator/root.go:111\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204"}
{"level":"error","ts":1635628662.563308,"logger":"pomerium-operator","msg":"operator failed to start. exiting","error":"no matches for kind \"Ingress\" in version \"extensions/v1beta1\"","stacktrace":"main.glob..func2\n\t/build/cmd/pomerium-operator/root.go:102\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895\nmain.main\n\t/build/cmd/pomerium-operator/root.go:111\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204"}
Error: no matches for kind "Ingress" in version "extensions/v1beta1"
Everything is OK with older cluster like 1.20.
travisgroth commented
Closed by #143
This should be resolved by migrating to the Pomerium Ingress Controller (docs). See deprecation notice for more info.