K9s: Per-node list of pods is empty

Created on 3 Oct 2019  路  14Comments  路  Source: derailed/k9s






Describe the bug
Go to list of nodes, press enter on one node. List of pods is empty.

To Reproduce
Above

Expected behavior
Shows list of pods running on a node

Versions (please complete the following information):

  • OS: OSX
  • K9s 0.9.0
  • K8s 1.15.1
bug question

Most helpful comment

@eldada Thank you for the feedback! I very much appreciate it and hear you. I agree with you guys and see why this is less than ideal and yields to an unexpected behavior. I'll bring it to the original behavior in the next drop.

All 14 comments

@dimm0 Thank you for reporting this! Could you add more details?
Can't seem to repro this at first glance. Are there any errors in the k9s logs if so can you please share them.
Also how are you staring k9s any rbac policies on this cluster?

There are a bunch of rbac policies, but my user has cluster-admin, and it worked fine in previous version
Where can I see logs? Nothing on the screen.. Just empty list of pods

@dimm0 Thank you for reporting back! I've most likely hosed something here. To view the logs first get the log location via k9s info then you can start k9s as so k9s -l debug. Hopefully some clues there on what's happening. Also please include info on how you're starting K9s! Thank you!

Log is attached, nothing interesting

k9s.log

What do you mean how I'm starting it? Typing k9s in console

I noticed this too. I think I can reproduce it.

Open k9s
:ns
select a namespace: "foo"
:no
Select a node with pods not in "foo"
Notice a empty list
:ns
select all
:no
Select same node
Notice all pods listed

Also I think filter is staying now after switching the type... But even after clearing the filter it's not showing those

@mcristina422 Very cool. Thank you Michael! I totally see it now. Indeed a bug on my part. I had to tighten the rule slightly here in light of RBAC access when listing the node pods. We used to always go the all namespaces but there are cases where you can only access some namespaces and not all. Thus the display is indeed wrong here since we are showing all namespaces which should be foo in your use case. Hence if you have access you have to tell k9s to use cluster wide namespace if you're coming into this view with a specific namespace. I'll fix this issue.

@dimm0 I wanted to see which command line options you were using when launching K9s.

@dimm0 @mcristina422 -- Fixed 0.9.1

In version 0.9.1, I still get this error...
As noted before:

Open k9s
:ns
select a namespace: "foo"
:no
Select a node with pods not in "foo"
Notice a empty list
:ns
select all
:no
Select same node
Notice all pods listed

Before the list was completely empty even after doing this... Now we're waiting for a fix in https://github.com/derailed/k9s/issues/336 I believe

@eldada @dimm0 Thank you both for reporting back! I think the display is correct now. The behavior is indeed as @eldada describes but it used to show the namespace to "all" vs "foo" which I believe has been fixed. So if you come in to node view with a namespace other than all then the pods list for each nodes will use the current namespace. Given some users have RBAC restrictions and may not have access to "all" namespaces this seems reasonable in light of the display showing which namespace is currently active when listing pods on nodes.

Does this make sense?

So you're saying you're not going to fix this to the way it was before?
It now requires an extra step to switch to "all" every time I want to see the node pods..

I understand the need and will live with it, although it does leave a quirky UX IMO.
Thanks for the clarification.

@eldada Thank you for the feedback! I very much appreciate it and hear you. I agree with you guys and see why this is less than ideal and yields to an unexpected behavior. I'll bring it to the original behavior in the next drop.

Was this page helpful?
0 / 5 - 0 ratings