K9s: Boom!! Unable to locate K8s cluster configuration.

Created on 18 Jul 2019  路  9Comments  路  Source: derailed/k9s

Hi!

If i run k9s with minikube, i see "Boom!! Unable to locate K8s cluster configuration."
I have created $HOME/.k9s/config.yml but k9s still doesn't see my minikube.

What i do wrong?
Thank you in advence!

question

Most helpful comment

@gpbenton FYI just gave microk8s a quick rinse. It looks like they stow away their own kubeconfig.

So I ran the following cmd:

microk8s.kubectl config view --raw > $HOME/.kube/config

And K9s correctly connected to my microK8s cluster. BTW installed K9s with linuxbrew as of 0.7.13. I hope this works for you too...

All 9 comments

@asomir Are you using a snap release of K9s? If so please download K9s from the release page as we're currently having issues with snap. If not did you set up a custom kubeconfig location?
What is the output of:

kubectl get nodes

I am getting the same output - using the binary download for 0.7.12 and microk8s

Boom!! Unable to locate K8s cluster configuration.
graham@lubuntu-1804:~/dev/k8spocv2/deploy/util
$ kubectl get nodes
NAME           STATUS   ROLES    AGE    VERSION
lubuntu-1804   Ready    <none>   100m   v1.15.0

@gpbenton Thank you for the addition! I haven't spin a microk8s cluster as of yet. Could you send me the K9s logs. It may contain some more insights. Tx!!

@gpbenton FYI just gave microk8s a quick rinse. It looks like they stow away their own kubeconfig.

So I ran the following cmd:

microk8s.kubectl config view --raw > $HOME/.kube/config

And K9s correctly connected to my microK8s cluster. BTW installed K9s with linuxbrew as of 0.7.13. I hope this works for you too...

Thanks @derailed , that fixed my problem. Do you think the error message could contain which file is missing, to make finding the problem easier?

@gpbenton Thank you! Yes I'll rework the error message a bit. By cluster configuration does mean K9s can not locate or load the kubeconfig file.

If you rename the contexts, and forget to change the value of current-context attribute in kubectl config file, this error will occur.

Wanted to confirm that switching from the snap version of k9s to the binary distribution fixed my problem with microk8s/Ubuntu. Thank you!

It happened to me because, a deployment script altered $KUBECONFIG environment variable. After revert it back, started working normally. export KUBECONFIG=$HOME/.kube/config

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdunford picture cdunford  路  3Comments

ArnaudMsh picture ArnaudMsh  路  3Comments

ctritten picture ctritten  路  3Comments

krysopath picture krysopath  路  3Comments

vasicvuk picture vasicvuk  路  3Comments