# MicroK8s configuration merge

**URL:** <https://discuss.kubernetes.io/t/microk8s-configuration-merge/14706>\
**Category:** microk8s\
**Created:** [February 4, 2021, 3:33pm UTC](https://discuss.kubernetes.io/t/microk8s-configuration-merge/14706 "2021-02-04T15:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonatasbaldin](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jonatasbaldin/32/6872_2.png) [@jonatasbaldin](https://discuss.kubernetes.io/u/jonatasbaldin)\
**Post date:** [February 4, 2021, 3:33pm UTC](https://discuss.kubernetes.io/t/microk8s-configuration-merge/14706/1 "2021-02-04T15:33:21Z")

</div>

Is there a way to merge the MicroK8s Kubernetes config (`microk8s kubectl config view`) with my local `~/.kube/config`? I know one can do some shenanigans by [playing around with two files](https://stackoverflow.com/questions/46184125/how-to-merge-kubectl-config-file-with-kube-config), but it would be very helpful to do that by default (like Kind and Minikube) or have a specific Microk8s command.

---

<div class="post-metadata">

**Author:** ![evilnick](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/evilnick/32/3481_2.png) [@evilnick](https://discuss.kubernetes.io/u/evilnick)\
**Post date:** [February 5, 2021, 12:21pm UTC](https://discuss.kubernetes.io/t/microk8s-configuration-merge/14706/2 "2021-02-05T12:21:15Z")

</div>

Yes, I was thinking about this recently. It isn’t that tricky to merge two configs with kubectl as it has the `--flatten` option to do that, but it is somewhat annoying to have to.  
You can retrieve the config with [`microk8s config`](https://microk8s.io/docs/commands#heading--microk8s-config) but it would be fairly easy to have that grow an `--export` option.
