# How to update authentication info of ~/kube/config after re-install of microk8s?

**URL:** <https://discuss.kubernetes.io/t/how-to-update-authentication-info-of-kube-config-after-re-install-of-microk8s/12139>\
**Category:** microk8s\
**Created:** [August 4, 2020, 3:51am UTC](https://discuss.kubernetes.io/t/how-to-update-authentication-info-of-kube-config-after-re-install-of-microk8s/12139 "2020-08-04T03:51:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TristanStanic](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/tristanstanic/32/5148_2.png) [@TristanStanic](https://discuss.kubernetes.io/u/TristanStanic)\
**Post date:** [August 4, 2020, 3:51am UTC](https://discuss.kubernetes.io/t/how-to-update-authentication-info-of-kube-config-after-re-install-of-microk8s/12139/1 "2020-08-04T03:51:04Z")

</div>

In the post [Microk8s cluster stuck after installing OLM 0.14.1](https://discuss.kubernetes.io/t/microk8s-cluster-stuck-after-installing-olm-0-14-1/12094). My microk8s cluster got stuck I don’t know how to untangle. The simple solution was to remove and re-install microk8s from scratch.

After the install, I cannot authenticate with my new cluster:

```auto
# NOTE: this is the regular kubectl (not microk8s.kubectl)
$ kubectl get namespaces

Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "10.152.183.1")

```

Can you please show how to update `~/kube/config` with the `certificate-authority-data` of the new cluster and the password of the admin user?

---

<div class="post-metadata">

**Author:** ![TristanStanic](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/tristanstanic/32/5148_2.png) [@TristanStanic](https://discuss.kubernetes.io/u/TristanStanic)\
**Post date:** [August 4, 2020, 4:03am UTC](https://discuss.kubernetes.io/t/how-to-update-authentication-info-of-kube-config-after-re-install-of-microk8s/12139/2 "2020-08-04T04:03:25Z")

</div>

Answer in [Where does microk8s store kubectl config file?](https://discuss.kubernetes.io/t/where-does-microk8s-store-kubectl-config-file/11032) . Thank you @kjackal

Just need to copy the info from `/var/snap/microk8s/current/credentials/client.config` to `${HOME}/.kube/config`
