Hello, I have a Rancher server in a single node installation.
I want to import a RKE2 cluster into my Rancher.
When I try to generate the import command, the result is empty commands:
rbahri@testmachine:~% rancher cluster create mycluster --import
Successfully created cluster mycluster
rbahri@testmachine:~% rancher cluster import mycluster
Run the following command in your cluster:
If you get an error about 'certificate signed by unknown authority' because your Rancher installation is running with an untrusted/self-signed SSL certificate, run the command below instead to bypass the certificate check:
Here are the Rancher server logs
2023/02/14 15:20:12 [INFO] [mgmt-cluster-rbac-delete] Creating namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-cluster-rbac-delete] Creating Default project for cluster c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Creating namespace p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-cluster-rbac-delete] Creating System project for cluster c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Creating namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-x2hbn
2023/02/14 15:20:12 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=c-x2hbn, err=Operation cannot be fulfilled on namespaces "c-x2hbn": the object has been modified; please apply your changes to the latest version and try again
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Creating creator projectRoleTemplateBinding for user user-hx622 for project p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Creating creator clusterRoleTemplateBinding for user user-hx622 for cluster c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Creating creator projectRoleTemplateBinding for user user-hx622 for project p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on project p-jg59z
2023/02/14 15:20:12 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-xvpvw, err=Operation cannot be fulfilled on namespaces "p-xvpvw": the object has been modified; please apply your changes to the latest version and try again
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role/clusterRole p-jg59z-projectowner
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Updating project p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating role/clusterRole c-x2hbn-clusterowner
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on project p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on cluster c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for membership in project p-jg59z for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating clusterRoleBinding for membership in cluster c-x2hbn for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role/clusterRole p-xvpvw-projectowner
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Updating project p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role/clusterRole c-x2hbn-clustermember
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Updating project p-jg59z
2023/02/14 15:20:12 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-jg59z, err=Operation cannot be fulfilled on namespaces "p-jg59z": the object has been modified; please apply your changes to the latest version and try again
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for membership in project p-xvpvw for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-hx622 with role cluster-owner in namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating clusterRoleBinding for membership in cluster c-x2hbn for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating clusterRoleBinding for membership in cluster c-x2hbn for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-project-rbac-create] Updating project p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace p-xvpvw
2023/02/14 15:20:12 [ERROR] defaultSvcAccountHandler: Sync: error handling default ServiceAccount of namespace key=p-jg59z, err=Operation cannot be fulfilled on namespaces "p-jg59z": the object has been modified; please apply your changes to the latest version and try again
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role project-owner in namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-hx622 with role cluster-owner in namespace p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Updating clusterRoleBinding crb-rsyzume4yj for cluster membership in cluster c-x2hbn for subject user-hx622
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role project-owner in namespace c-x2hbn
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role admin in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-hx622 with role cluster-owner in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role admin in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating role admin in namespace p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role project-owner in namespace p-xvpvw
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role project-owner in namespace p-jg59z
2023/02/14 15:20:12 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-hx622 with role admin in namespace p-xvpvw
2023/02/14 15:20:13 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-x2hbn
Rancher server version: v2.7.1
Rancher CLI version: v2.6.0 (since v2.6.4+ has a blocking bug when rancher-cli v2.6.4 errors out trying to create an imported cluster. · Issue #37574 · rancher/rancher · GitHub)
Any help please? Workarounds or other ways to import the cluster?
Thank you!