Importing new k3s cluster into Rancher 2.6.3


I installed successfully rancher (latest) on a local k3s cluster (local) via helm.
So far so good…

Then, I installed a fresh k3s cluster with 3 nodes successfully again.
Those two clusters are workign basically fine.

Now, I wanted to import the fresh installed k3s cluster into rancher.

I used the command (because of self-signed ssl):

curl --insecure -sfL | kubectl apply -f -

I also created the cluster-admin-rolebinding user “default” equal to the “.kube/config” file.

kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user default

kubectl logs -n cattle-system cattle-cluster-agent-577dd689c-vq5sl

ERROR: is not accessible (Failed to connect to port 443: Connection timed out)

Checked the rancher cluster (local) if 443 is available

kubectl get svc -A --kubeconfig=".kube/config.rancher" |grep traefik
kube-system traefik LoadBalancer,, 80:30091/TCP,443:30813/TCP 4d22h

What I’m missing here?

Thx ara

In addition, I have fully TCP/IP connectivity on all nodes…

I noticed a discrepancy between your Rancher server URL and the site that the imported cluster is trying to ping. Those URLs need to be the same. Can you go into the global settings and make sure server-url matches where Rancher is actually running?