derailed / k9s

šŸ¶ Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
26.31k stars 1.65k forks source link

No skin file found but it exists in this path #2114

Closed vadimshvetsov closed 9 months ago

vadimshvetsov commented 1 year ago




Describe the bug Hey, thanks for the great product. I can't handle applying skin on ubuntu, on macos works great. What am I doing wrong or probably its a bug?

To Reproduce Steps to reproduce the behavior:

  1. Install k9s@0.27.4
  2. Install theme:
    curl -L https://raw.githubusercontent.com/derailed/k9s/master/skins/dracula.yml --output ~/.config/k9s/skin.yml
    cat ~/.config/k9s/skin.yml # check that correct contents are there
  3. Run k9s
  4. See that skin file not loaded, check logs
    CustomView watcher failed ESC[36merror=ESC[0mESC[31m"no such file or directory"ESC[0m
    ESC[90m11:10PMESC[0m ESC[32mINFESC[0m šŸ¶ K9s starting up...
    ESC[90m11:10PMESC[0m ESC[32mINFESC[0m āœ… Kubernetes connectivity
    ESC[90m11:10PMESC[0m ESC[31mWRNESC[0m No context specific skin file found -- /home/vadim/.config/k9s/default_skin.yml
    ESC[90m11:10PMESC[0m ESC[31mWRNESC[0m No skin file found -- /home/vadim/.config/k9s/skin.yml. Loading stock skins.
    ESC[90m11:10PMESC[0m ESC[31mWRNESC[0m Custom view load failed /home/vadim/.config/k9s/views.yml ESC[36merror=ESC[0mESC[31m"open /home/vadim/.config/k9s/views.yml: no s

File is there, contents are 100% copy from skins/dracula.yml, I've checked with copying path from logs

Expected behavior Dracula theme applied to the k9s

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

I see cluster pods, works good. Here is envs in .zshrc

export KUBECONFIG=$HOME/.kube/config
export K9SCONFIG=$HOME/.config/k9s
export XDG_CONFIG_HOME=$HOME/.config
josip-stanic commented 1 year ago

Same behavior on CentOS 7:

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

Version:    v0.27.4
Commit:     f4543e9bd2f9e2db922d12ba23363f6f7db38f9c
Date:       2023-05-07T16:55:34Z

$ head /tmp/k9s-XX.log
10:56PM INF šŸ¶ K9s starting up...
10:56PM INF āœ… Kubernetes connectivity
10:56PM WRN No context specific skin file found -- /persistent/home/XX/.config/k9s/xx/xx_skin.yml
10:56PM WRN No skin file found -- /persistent/home/XX/.config/k9s/skin.yml. Loading stock skins.
10:56PM WRN Custom view load failed /persistent/home/XX/.config/k9s/views.yml error="open /persistent/home/XX/.config/k9s/views.yml: no such file or directory"
10:56PM WRN CustomView watcher failed error="no such file or directory"
10:57PM INF šŸ¶ K9s starting up...
  XX@xx  ~    $ ls -ltra /persistent/home/XX/.config/k9s/skin.yml
-rw-rw-r-- 1 XX XX 2781 Jun 13 22:21 /persistent/home/XX/.config/k9s/skin.yml
derailed commented 1 year ago

@vadimshvetsov @josip-stanic Thank you both for reporting this! I think it might be a bad error message at play here ie the file is indeed there but the content is toast (fix is on the way!). Not sure if you are using a custom skin or one of the stock ones?? but I think that might be the issue here. Could you add the skin file details here? Also try a different stock skin and see if we're happier... Tx!

josip-stanic commented 1 year ago

@derailed appreciate the fast response. On my end I was trying to use dracula, your hint helped, I copy pasted https://raw.githubusercontent.com/derailed/k9s/master/skins/dracula.yml (raw) and now it works as expected on my end (:. Thanks

vadimshvetsov commented 1 year ago

Hey, thanks for the response.

I'm trying to use Dracula as well. Issue still there, other stock skins don't work for me too.

arthurcgc commented 1 year ago

Same issue here. Tried with most stock skins and still get the error...

šŸ¶ K9s starting up...
Active Context "cluster_name

āœ… Kubernetes connectivity
No context specific skin file found -- /home/arthurcgc/.cluster_name_skin.yml
No skin file found -- /home/arthurcgc/.config/k9s/skin.yml

Factory START with ns `"all"
Fetching latest k9s rev...
k9s latest rev fetch failed No version found
CustomView watching `/home/arthurcgc/.config/k9s/views.yml
Custom view load failed /home/arthurcgc/.config/k9s/views.
home/arthurcgc/.config/k9s/views.yml: no such file or dire

CustomView watcher failed ^[[36merror=^[[0m^[[31m"no such

No DAO registry entry for "config.gatekeeper.sh/v1alpha1/c

Fetching latest k9s rev...
k9s latest rev fetch failed No version found
Fetching latest k9s rev...
k9s latest rev fetch failed No version found
Fetching latest k9s rev...
k9s info
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Configuration:   /home/arthurcgc/.config/k9s/config.yml
Logs:            /tmp/k9s-arthurcgc.log
Screen Dumps:    /tmp/k9s-screens-arthurcgc
ls -ll /home/arthurcgc/.config/k9s/
total 8
-rw-r--r-- 1 arthurcgc arthurcgc 2158 jul 25 11:29 config.yml
-rw-r--r-- 1 arthurcgc arthurcgc 2598 jul 25 11:23 skin.yml

Keep in mind I'm using alacritty+tmux, I tried exporting TERM=xterm-256color but had no success... Here's my neofetch:

OS: ArcoLinux
Kernel: 6.4.5-zen1-1-zen
Uptime: 20 mins
Packages: 1653 (pacman)
Shell: bash 5.1.16
Resolution: 1920x1080, 1920x1080
WM: i3
Theme: Arc-Nice-blue-Dark [GTK2/3]
Icons: Surfn-Arch-Blue [GTK2/3]
Terminal: tmux
CPU: AMD Ryzen 5 5600X (12) @ 4.200GHz
GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/57
Memory: 1.85GiB / 31.25GiB (5%)
GPU Driver: nvme
CPU Usage: 14%
Disk (/): 45G / 405G (12%)
Font: Noto Sans 11 [GTK2/3]
mattfield commented 10 months ago

I was facing the same issue but got it working by pulling out the views block from the stock skin (nightfox, in my case), and putting it in $XDG_CONFIG_HOME/k9s/views.yml (the file that most error logs above are complaining they can't find) under another k9s: block, so:

k9s:
  views:
  ...
derailed commented 9 months ago

@vadimshvetsov Hi Valdim - did ever you manage to get this to work? If not please reopen. Tx!

vadimshvetsov commented 5 months ago

Hey, thanks for asking. I just tried it with 0.32.4 and it works perfectly. Don't remember why it didn't work now, but most likely the issue was there because I had two configs - config.yaml and config.yml in $XDG_CONFIG_HOME and dracula was set in yml which was not respected. Thanks for the help.