Unable to authenticate into k8s cluster

Using Rancher 1.6.12, I have set up a three-node k8s cluster on aws.

The k8s dashboard and cli are both available and responding.

From the Rancher ui, I have downloaded the kubectl config file, so I can interact with k8s via kubectl.

However, when running e.g. kubectl get pod, I get:

error: You must be logged in to the server (Unauthorized)

kubectl config view does return the contents of the config file I downloaded and placed in ~/.kube

The file contains among other a username and password.

Do I have to perform any extra step(s) for me to authenicate?

At some point in time, when I re-created the config file from the UI, it came up with a token within, instead of a username/password.

I was able to authenticate thereafter.

Pls consider this closed/resolved (somehow …)