# Unable to authenticate into k8s cluster

**URL:** <https://forums.suse.com/t/unable-to-authenticate-into-k8s-cluster/8118>\
**Category:** General\
**Created:** [December 29, 2017, 10:44am UTC](https://forums.suse.com/t/unable-to-authenticate-into-k8s-cluster/8118 "2017-12-29T10:44:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pkaramol/32/2883_2.png) [@pkaramol](https://forums.suse.com/u/pkaramol)\
**Post date:** [December 29, 2017, 10:44am UTC](https://forums.suse.com/t/unable-to-authenticate-into-k8s-cluster/8118/1 "2017-12-29T10:44:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pkaramol/32/2883_2.png) [@pkaramol](https://forums.suse.com/u/pkaramol)\
**Post date:** [December 29, 2017, 11:48am UTC](https://forums.suse.com/t/unable-to-authenticate-into-k8s-cluster/8118/2 "2017-12-29T11:48:20Z")

</div>

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 …)
