k9s icon indicating copy to clipboard operation
k9s copied to clipboard

Multi-cluster mode ?

Open azr opened this issue 7 months ago • 2 comments

Is your feature request related to a problem? Please describe.

I have to deal with many clusters. I have this command that starts an iterm and runs a specific k9s on each iterm:

get_clusters | iterm_k9s

tell application "iTerm"
  create window with default profile
  delay 0.3
  tell current window
    tell current session
      write text "k9s --context ${ctx} --headless -n all -c 'pod /!running|completed|terminating'"

And this works, but, also is meh ? Because if I want to change a filter I have to do it for each window. Sometimes a filter makes a specific cluster empty, but the window takes the whole screen space. But I have more clusters than screen space, so I end up resizing terms all the time.

Describe the solution you'd like

Could be nice to launch k9s in multi cluster mode, ex, k9s --context context_a,context_b or something.

The display settings would be the same for all instances, like :

  • [pods/node/etc], but for all clusters, and a single filter/namespace setting but for all cluster views.

Describe alternatives you've considered

That script starting many iterm instances ? But meh.

azr avatar Jun 02 '25 12:06 azr

Going the same direction, also supporting multiple namespaces would be nice. I always have to go through a bunch of them, to then do the same filters etc

mpas97 avatar Jun 04 '25 04:06 mpas97

@azr I think you can use k9s alias feature here to make certain commands available and share it across all your clusters.

# ~/.config/k9s/aliases.yaml
aliases:
  pbozo: po ns-1 /bozo app=blee # => show pods in ns ns-1 filtered by bozo with labels app=blee

Would this help?

derailed avatar Jun 08 '25 13:06 derailed

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 09 '25 02:07 github-actions[bot]