Configure microk8s to use ~/.kube/config

3/16/2020

I've added stuff to my ~/.kube/config which doesn't appear when I do:

microk8s.kubectl config view

I'd like to use Microk8s with the default config file location.

Is this possible?

-- LondonRob
kubernetes
microk8s

1 Answer

3/16/2020

It is possible in the latest snap version (1.14.1) by editing /var/snap/microk8s/current/args/kubectl and changing --kubeconfig to point to your own preferred config file, or in my case:

--kubeconfig=${KUBECONFIG}

-- Arghya Sadhu
Source: StackOverflow