Import cluster failed - The connection to the server localhost:8080 was refused

I’m trying to import a custom cluster following this guidance https://rancher.com/docs/rancher/v2.x/en/tasks/clusters/import-cluster/.

I got error **The connection to the server localhost:8080 was refused - did you specify the right host or port?
** when I am at step 7.
I googled from internet and saw a similar issue is discussed at https://github.com/kubernetes/kubernetes/issues/44665, but it could not help me because I don’t have admin.conf under /etc/kubernetes/ folder. What are the possible problems am I running into?

If you used rke up to create the cluster it created kube_config_cluster.yml
Either import the content of the file to .kube/config or use --kubeconfig=path/kube_config_cluster.yml
now you can run the import command generated by importing a cluster to rancher