derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
26.9k stars 1.69k forks source link

Update to latest not seeing config #2445

Closed johncogan1972 closed 9 months ago

johncogan1972 commented 9 months ago




Describe the bug Upgraded to 0.31.0 now k9s panics saying to such config file or directory.

I can see directory and file. Have even moved it to non standard directory, one without spaces in the name and changed environment variable to point it to said directory without success.

To Reproduce Steps to reproduce the behavior:

Upgrade to 0.31.0 on MAc osx

Historical Documents

k9s info:

Version: 0.31.0 Config: /Users/jc/.k9s-config/config.yaml Custom Views: /Users/jc/.k9s-config/views.yaml Plugins: /Users/jc/.k9s-config/plugins.yaml Hotkeys: /Users/jc/.k9s-config/hotkeys.yaml Aliases: /Users/jc/.k9s-config/aliases.yaml Skins: /Users/jc/.k9s-config/skins Context Configs: /Users/jc/.k9s-config/clusters Logs: /var/folders/rb/xp3r532x1nv14x3npypzyr040000gp/T/johncogan/k9s/k9s.log Benchmarks: /Users/jc/.k9s-config/benchmarks ScreenDumps: /Users/jc/.k9s-config/screen-dumps

ls -la of directory, proof files and folder exists:

ls -la /Users/jc/.k9s-config/
total 16 drwxr-xr-x 8 jc staff 256 9 Jan 08:46 . drwxr-xr-x+ 98 jc staff 3136 9 Jan 09:02 .. drwxr--r-- 2 jc staff 64 9 Jan 08:44 benchmarks drwxr--r-- 2 jc staff 64 9 Jan 08:44 clusters -rw-r--r-- 1 jc staff 1254 9 Jan 08:46 config.yml -rw------- 1 jc staff 477 9 Jan 08:46 k9s.log drwxr--r-- 2 jc staff 64 9 Jan 08:44 screen-dumps drwxr--r-- 2 jc staff 64 9 Jan 08:44 skins

Error returned:

`> k9s Error: open /Users/jc/.k9s-config/config.yaml: no such file or directory Usage: k9s [flags] k9s [command]

Available Commands: completion Generate the autocompletion script for the specified shell help Help about any command info List K9s configurations info version Print version/build info

Flags: -A, --all-namespaces Launch K9s in all namespaces --as string Username to impersonate for the operation --as-group stringArray Group to impersonate for the operation --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --cluster string The name of the kubeconfig cluster to use -c, --command string Overrides the default resource to load when the application launches --context string The name of the kubeconfig context to use --crumbsless Turn K9s crumbs off --headless Turn K9s header off -h, --help help for k9s --insecure-skip-tls-verify If true, the server's caCertFile will not be checked for validity --kubeconfig string Path to the kubeconfig file to use for CLI requests --logFile string Specify the log file (default "/var/folders/rb/xp3r532x1nv14x3npypzyr040000gp/T/jc/k9s/k9s.log") -l, --logLevel string Specify a log level (info, warn, debug, trace, error) (default "info") --logoless Turn K9s logo off -n, --namespace string If present, the namespace scope for this CLI request --readonly Sets readOnly mode by overriding readOnly configuration setting -r, --refresh int Specify the default refresh rate as an integer (sec) (default 2) --request-timeout string The length of time to wait before giving up on a single server request --screen-dump-dir string Sets a path to a dir for a screen dumps --token string Bearer token for authentication to the API server --user string The name of the kubeconfig user to use --write Sets write mode by overriding the readOnly configuration setting

Use "k9s [command] --help" for more information about a command.

panic: open /Users/jc/.k9s-config/config.yaml: no such file or directory

goroutine 1 [running]: github.com/derailed/k9s/cmd.Execute(...) github.com/derailed/k9s/cmd/root.go:60 main.main() github.com/derailed/k9s/main.go:32 +0x3c`

Expected behavior k9s to run

I have removed and reinstalled k9s also in an attempt to get it working

Versions (please complete the following information):

Alideniz commented 9 months ago

It is a breaking changes. You can go to https://github.com/derailed/k9s/releases page and see Breaking Bad! section. There is a way to fix this problem.

derailed commented 9 months ago

@johncogan1972 I think this issue was addressed in v0.31.1. if not please reopen. Tx!!