k9s: k9s snap release wont start




Describe the bug A clear and concise description of what the bug is.

22:21:56 θ67° [rolf:~] $ snap info k9s
name:      k9s
summary:   K9s is a CLI to view and manage your Kubernetes clusters.
publisher: Fernand Galiana (derailed)
contact:   fernand@imhotep.io
license:   unset
description: |
  K9s is a CLI to view and manage your Kubernetes clusters.
  By leveraging a terminal UI, you can easily traverse Kubernetes resources
  and view the state of you clusters in a single powerful session.
commands:
  - k9s
snap-id:      IIsGjhjg5ghn6VAZFbferlrrh4zy2kO9
tracking:     stable
refresh-date: today at 22:20 CEST
channels:
  stable:    0.7.7 2019-06-14 (126) 9MB -
  candidate: ↑                          
  beta:      ↑                          
  edge:      0.5.1 2019-04-19  (99) 9MB devmode
installed:   0.7.7            (126) 9MB -
22:22:07 ⌂69% θ64° [rolf:~] $ whereis k9s
k9s: /snap/bin/k9s
22:22:20 ⌂64% θ64° [rolf:~] $ k9s

 ____  __.________       
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \ 
|____|__ \ /____//____  >
        \/            \/ 

Boom!! Refine Config.
22:22:23 ⌂61% θ67° [rolf:~] $ 
22:25:43 θ64° [rolf:~] $ k9s version
 ____  __.________       
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \ 
|____|__ \ /____//____  >
        \/            \/ 

Version:   0.7.7
Commit:    2eb817fda8c62c772cfdd0424cbe54706c356f26
Date:      2019-06-14T01:50:05Z

To Reproduce Had 0.7.5 installed. Installed 0.7.7 with snap and got this error. Tried deleting .k9s folder but no difference.

Expected behavior k9s to make awesome Versions (please complete the following information):

  • OS: Ubuntu 18.04
  • K9s 0.7.7
  • K8s 1.14.x

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

To start k9s with snap on Ubuntu 18.04 I had to manually create ~/.k9s and run it with k9s --kubeconfig ~/.kube/config

To start k9s with snap on Ubuntu 18.04 I had to manually create ~/.k9s and run it with k9s --kubeconfig ~/.kube/config

This worked for me. Is there a way of embedding that config into k9s so that we don’t have to type it every time?

Ah, too bad @derailed, thanks for explanation! Will try installation from source. Update: edge installation worked snap install k9s --edge --devmode as mentioned https://github.com/derailed/k9s/issues/166#issuecomment-485059530

Have the same issue on Ubuntu 18.04, also I tried to follow https://github.com/derailed/k9s/issues/240#issuecomment-505823987 suggestion, I still got:

|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \ 
|____|__ \ /____//____  >
        \/            \/ 
Boom!! Unable to locate K8s cluster configuration

If I take a look at logs there seam to be permission/ownership issue:

3:08PM INF 🐶 K9s starting up...
3:08PM WRN Unable to locate K9s config. Generating new configuration...
3:08PM PNC Unable to locate K8s cluster configuration error="Error loading config file \"/home/anita/.kube/config\": open /home/anita/.kube/config: permission denied"
3:08PM ERR Boom! Unable to locate K8s cluster configuration
3:08PM ERR goroutine 1 [running]:
runtime/debug.Stack(0x290f3c0, 0x1805703, 0x0)
	/usr/local/Cellar/go/1.12.6/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/derailed/k9s/cmd.run.func1()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:67 +0x185
panic(0x15a3220, 0xc0002bfbd0)
	/usr/local/Cellar/go/1.12.6/libexec/src/runtime/panic.go:522 +0x1b5
github.com/rs/zerolog.(*Logger).Panic.func1(0x1831ace, 0x2a)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/rs/zerolog@v1.14.3/log.go:319 +0x4f
github.com/rs/zerolog.(*Event).msg(0xc0000c85a0, 0x1831ace, 0x2a)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/rs/zerolog@v1.14.3/event.go:141 +0x1c1
github.com/rs/zerolog.(*Event).Msg(...)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/rs/zerolog@v1.14.3/event.go:105
github.com/derailed/k9s/cmd.loadConfiguration(0x0)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:99 +0x4d2
github.com/derailed/k9s/cmd.run(0x28fffa0, 0xc0000d0780, 0x0, 0x2)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:75 +0x87
github.com/spf13/cobra.(*Command).execute(0x28fffa0, 0xc0000b2070, 0x2, 0x2, 0x28fffa0, 0xc0000b2070)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x28fffa0, 0x0, 0x0, 0x0)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/derailed/k9s/cmd.Execute()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:57 +0x2e
main.main()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/main.go:26 +0x1a7

Anyhow /home/anita/.kube/config is owned by same user as k9s and permissions seam legit… maybe someone experienced same?

@roflmao @lukaszo @joskfg - the interaction with the snap folks is taking forever. Think you should give LinuxBrew install instead. Can you give 0.7.13 a rinse? Thank so very much for all your reports!

@roflmao Thank you for sending this! Could you do me a favor and try the following provided you’re using a std kuconfig setup. Thank you!!

export KUBECONFIG=$HOME/.kube/config
k9s -l debug