Open yrsurya opened 2 years ago
@yrsurya Hum what happens if you start k9s using k9s -c po
?
I have run into this too, just a different CR.
k9s version = v0.25.8
Workarounds:
k9s -c po
like @derailed said.~/.config/k9s/config.yml
and start k9s:
view:
active: kustomize.toolkit.fluxcd.io/v1beta1/kustomizations
I can reliably trigger this error on startup after I exit k9s while I was viewing objects with API version kustomize.toolkit.fluxcd.io/v1beta1/kustomizations
:
Boom!! app run failed `kustomize.toolkit.fluxcd.io/v1beta1/kustomizations` command not found.
What's weird is that it's not uncommon, when I filter for aliases, that this first API version is absent from the listing, then appears within about 10 seconds, first with the blue color as if the CRD for that API version just came into existence, like when a pod is initializing.
kustomizations kustomize.toolkit.fluxcd.io/v1beta1/kustomizations kustomize.toolkit.fluxcd.io
kustomizations ks,kustomization,kustomizations,kustomize.toolkit.fluxcd.io/v1beta2/kustomizations kustomize.toolkit.fluxcd.io
There could be something strange going on with these objects. A couple months ago the API version got bumped from v1beta1
to v1beta2
but I can't find any v1beta1
objects in this cluster, which matches my expectation.
@DaemonDude23 Thanks Andrew! If you could share the k9s logs perhaps we can try to zero in. I use CRDs quiet a bit and have yet to see this issue. Perhaps you're onto something with the crd version...
Thanks dude. Here's some more info.
k9s -l debug
ctrl-c
to exit.k9s -l debug
11:36AM INF 🐶 K9s starting up...
11:36AM DBG Active Context "REDACTED"
11:36AM INF ✅ Kubernetes connectivity
11:36AM WRN No context specific skin file found -- /home/USERNAME/.config/k9s/REDACTED_skin.yml
11:36AM WRN No skin file found -- /home/USERNAME/.config/k9s/skin.yml. Loading stock skins.
11:37AM DBG Factory START with ns `"backend"
11:37AM DBG Fetching latest k9s rev...
11:37AM DBG K9s latest rev: "v0.25.12"
11:37AM DBG CustomView watching `/home/USERNAME/.config/k9s/views.yml
11:37AM WRN Custom view load failed /home/USERNAME/.config/k9s/views.yml error="open /home/USERNAME/.config/k9s/views.yml: no such file or directory"
11:37AM WRN CustomView watcher failed error="no such file or directory"
11:37AM DBG No DAO registry entry for "aliases". Using generics!
11:37AM DBG TABLE-UPDATER canceled -- "v1/pods"
11:37AM WRN Validation failed for namespace: "*" error="namespaces \"*\" not found"
11:37AM ERR [Config] Validation error active namespace "*" does not exists
11:37AM DBG [Config] Invalid favorite found '*' - false
11:37AM DBG TABLE-UPDATER canceled -- "v1/pods"
11:37AM DBG No DAO registry entry for "kustomize.toolkit.fluxcd.io/v1beta1/kustomizations". Using generics!
11:37AM INF 🐶 K9s starting up...
11:37AM DBG Active Context "REDACTED"
11:37AM INF ✅ Kubernetes connectivity
11:37AM WRN No context specific skin file found -- /home/USERNAME/.config/k9s/REDACTED_skin.yml
11:37AM WRN No skin file found -- /home/USERNAME/.config/k9s/skin.yml. Loading stock skins.
11:37AM DBG Factory START with ns `"backend"
11:37AM DBG Fetching latest k9s rev...
11:37AM DBG K9s latest rev: "v0.25.12"
11:37AM DBG CustomView watching `/home/USERNAME/.config/k9s/views.yml
11:37AM WRN Custom view load failed /home/USERNAME/.config/k9s/views.yml error="open /home/USERNAME/.config/k9s/views.yml: no such file or directory"
11:37AM WRN CustomView watcher failed error="no such file or directory"
11:37AM ERR Default run command failed "kustomize.toolkit.fluxcd.io/v1beta1/kustomizations backend" error="`kustomize.toolkit.fluxcd.io/v1beta1/kustomizations` command not found"
It mentions namespace '*'
. I've noticed when I first encountered this issue that that namespace favorite was set in config.yml
. It's not there right now (I removed it earlier and it hasn't returned), following my reproduction to get those logs. Not sure if that could be related.
Same here. Appears that it somehow saved the last thing I searched when I first run it and now it's trying to run it again but that's not a registered command? Strange.
k9s
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Boom!! app run failed `helmrepositories` command not found.
And now, I can't even start it. Version:
k9s version
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Version: v0.25.18
Commit: 6085039f83cd5e8528c898cc1538f5b3287ce117
Date: 2021-12-28T16:53:21Z
And yes, removing this bit:
view:
active: helmrelease
From the config, fixed it.
So, to reproduce... Create a CRD. Load that up by using it ( I used :helmreleases
). Quit k9s. Delete the cluster, start a new cluster (I used Kind), and open k9s. Boom... crashed. :)
Running into this issue in v0.25.18 (commit 6085039f83cd5e8528c898cc1538f5b3287ce117).
First I launched k9s without issues using the command k9s --context <context-name>
. Then I applied a filter cluster.x-k8s.io/v1alpha2/clusters all
and found resources of that type in all namespaces. I quit via Ctrl + C.
With the next invocation of k9s --context <context-name>
with the same context name as before, I see the error that has been shared before, and k9s does not come up.
As has been mentioned above by @derailed, the -c
/ --command
flag can be used to override the bad default command. E. g.
k9s --command ns
k9s --command po
Just making it more visible here.
I found an easier scenario to reproduce the error:
k9s
networking.istio.io/v1alpha3/virtualservices
in my case)k9s
(I run it in the same iTerm
window by splitting it vertically; it's a common scenario to debug or run demos)
❯ k9s
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Boom!! app run failed networking.istio.io/v1alpha3/virtualservices
command not found.
Again, running `k9s -c po` _solves_ the issue.
syaramada@surya007 ~> k9s __ .____
| |/ _/ _ | < \ / / | | \ / /_ \ |__| \ /__//____ > \/ \/
Boom!! app run failed
getambassador.io/v1beta2/filterpolicies
command not found. syaramada@surya007 ~> k9s version __ .____| |/ _/ _ | < \ / / | | \ / /_ \ |__| \ /__//____ > \/ \/
Version: v0.25.7 Commit: 6b6a490c73af8719a56e1c4a8dec92a6c2466dce Date: 2021-11-26T21:04:14Z
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context Add any other context about the problem here.