Error importing existing Openshift cluster

Hello!

I’m trying to import a previously existing OpenShift cluster into my Rancher server, I created the cluster in the rancher GUI and curled/applied the import manifest into OpenShift logged as a cluster-admin user.

The cluster is stuck in pending and the cattle-cluster-agent pod is in CrashLoopBackOff STATUS, the pod logs read as follows:

time="2023-03-21T15:22:28Z" level=info msg="Listening on /tmp/log.sock"

time="2023-03-21T15:22:28Z" level=info msg="Rancher agent version v2.7.1 is starting"

time="2023-03-21T15:22:28Z" level=info msg="EnsureSecretForServiceAccount: waiting for secret [cattle-dockercfg-sqwlk] to be populated with token"

time="2023-03-21T15:22:36Z" level=fatal msg="looking up cattle-system/cattle ca/token: failed to ensure secret for service account cattle-system/cattle: error ensuring secret for service account [cattle-system:cattle]: timed out waiting for the condition"

In my case i have to add manualy the secret to SA
cattle-impersonation-u-j#####

  • name: cattle-impersonation-u-jlogocxdxy-token-####

Thats happend with the cattle SA to and the solution its the same
add the secret*

secrets:
- name: cattle-token-#####*
- name: cattle-dockercfg-####

RancherV:v2.7.5
OC Version:v1.24.6