cockroachdb / cockroach-operator

k8s operator for CRDB
Apache License 2.0
287 stars 95 forks source link

Operator pod in CrashLoop state #816

Open jamesATtelus opened 3 years ago

jamesATtelus commented 3 years ago

Trying to install the latest operator from OperatorHub, but the operator pod kept restarting after the following message is showed:

{"level":"error","ts":1636148065.0665808,"logger":"setup","msg":"problem running manager","error":"open /tmp/k8s-webhook-server/serving-certs/tls.crt: no such file or directory","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\texternal/com_github_go_logr_zapr/zapr.go:132\nsigs.k8s.io/controller-runtime/pkg/log.(*DelegatingLogger).Error\n\texternal/io_k8s_sigs_controller_runtime/pkg/log/deleg.go:144\nmain.main\n\tcmd/cockroach-operator/main.go:122\nruntime.main\n\tGOROOT/src/runtime/proc.go:225"}

Operator version: v2.3.0 Kubernetes: Openshift 4.6.21

Any help will be appreciated!

pseudomuto commented 3 years ago

@jamesATtelus can you confirm this is still an issue with v2.4.0?

jamesATtelus commented 3 years ago

v2.4.0 is not yet available in OperatorHub.

kakascx commented 2 years ago

I create k8s cluster with minikube and the same error happened. I resolve the problem by following

mkdir -p /tmp/k8s-webhook-server/serving-certs/
cp /home/ubuntu/.minikube/profiles/minikube/apiserver.crt /tmp/k8s-webhook-server/serving-certs/tls.crt
cp /home/ubuntu/.minikube/profiles/minikube/apiserver.key /tmp/k8s-webhook-server/serving-certs/tls.key

Maybe u can try in ur development env

pseudomuto commented 2 years ago

I'm still not able to reproduce this. Would either of you mind verifying that this is still an issue?