rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
23.44k stars 2.97k forks source link

While Importing Cluster getting error: Failed to communicate with cluster: Unauthorized #43516

Open PrateekKhatri01 opened 3 years ago

PrateekKhatri01 commented 3 years ago

Hi Team,

I have setup rancher on my eks cluster. When I try to import other clusters from rancher portal I am getting error:

Failed to communicate with cluster: Unauthorized

I am able to create the cluster but not able to import the clusters.

Can u please let me know why it is happening?

Rancher Version : 2.6.0

image

justinclitheroe commented 3 years ago

Also having this issue, no problem when I was on 2.5 with the same process

Steps: Set up amazon IAM user Configured cloud credentials imported eks cluster in "Failed to communicate with cluster: Unauthorized"

PrateekKhatri commented 3 years ago

Try to update the configmap file of the cluster which you are importing to the rancher. Run the below command:

kubectl edit configmap aws-auth -n kube-system

Add below configuration to your configmap file (below mapRoles) and save it:

**mapUsers: |

And then try to import the cluster.