Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: invalid configuration: no configuration has been provided #54

Open
ludovicc opened this issue Jun 17, 2019 · 4 comments
Open

panic: invalid configuration: no configuration has been provided #54

ludovicc opened this issue Jun 17, 2019 · 4 comments

Comments

@ludovicc
Copy link

ludovicc commented Jun 17, 2019

Hello, I trying kube-prompt with microk8s on Ubuntu 18.04.

I installed microk8s using the following commands:

sudo snap install microk8s --classic
sudo snap alias microk8s.kubectl kubectl

kube-prompt seems to work well, until you invoke a 'describe no' command

>>> get nodes
NAME       STATUS   ROLES    AGE     VERSION
hos54985   Ready    <none>   6h22m   v1.14.2
>>> describe no panic: invalid configuration: no configuration has been provided

goroutine 9 [running]:
github.com/c-bata/kube-prompt/kube.NewClient(0x114f6ff)
	/build/go/src/github.com/c-bata/kube-prompt/kube/client.go:28 +0x1ad
github.com/c-bata/kube-prompt/kube.getClient(...)
	/build/go/src/github.com/c-bata/kube-prompt/kube/client.go:15
github.com/c-bata/kube-prompt/kube.fetchNodeList()
	/build/go/src/github.com/c-bata/kube-prompt/kube/resource.go:464 +0x114
created by github.com/c-bata/kube-prompt/kube.getNodeSuggestions
	/build/go/src/github.com/c-bata/kube-prompt/kube/resource.go:470 +0x39

Do you have any idea for how to fix this issue?
Thanks

@ludovicc
Copy link
Author

Update: running the following command seems to provide a work-around:

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

@mic4ael
Copy link

mic4ael commented Mar 5, 2020

Hey @ludovicc how is it possible that you were able to launch kube-prompt without the kubeconfig file? I was trying to reproduce the problem but I am already getting error invalid configuration: no configuration has been provided when launching kube-prompt.

@ludovicc
Copy link
Author

ludovicc commented Mar 9, 2020

I cannot remember that detail... I did a fresh install of microk8s on my machine, then launched kube-prompt and it seemed to work at first. Now it seems that kube-prompt complains with an error message, which is good. The error message could be improved, for example 'error invalid configuration: no Kubernetes configuration found at ~/.kube/config'

@mic4ael
Copy link

mic4ael commented Mar 16, 2020

I guess this issue can be then closed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants