Skip to content

Add cluster watch subcommand - #398

Open
TLINDEN wants to merge 10 commits into
masterfrom
cluster-watch
Open

TLINDEN wants to merge 10 commits into
masterfrom
cluster-watch

Conversation

@TLINDEN

@TLINDEN TLINDEN commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds a new subcommand, cluster watch. It's a TUI using the bubbletea and lipgloss modules. The TUI doesn't do much yet, it only allows the operator to view current state of a cluster as well as errors, logs and node status. The TUI is (yet) completely read-only, so no administrative operations are implemented.

Please note, that I had to turn output.humanizeDuration() into output.HumanizeDuration(), otherwise I couldn't use it in cmd/cluster_watch.go.

Screenshots:

Peace view

watch-normal

Update view

watch-error

Used AI-Tools ✨

None used.

Noteworthy

This release adds a new subcommand `cluster watch`, which displays a terminal UI. By using this tui you can live follow the events happening on a cluster, e.g. during an update.

-->

@TLINDEN TLINDEN self-assigned this Nov 11, 2026
@TLINDEN
TLINDEN requested a review from a team as a code owner November 11, 2026 13:00
@majst01

majst01 commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Nice, are you aware of the cluster dashboard command ?
I think your effort should be part of that and the dashboard could be the starting point to inspect the details of a single cluster.

Maybe event better, your usage of a more modern tooling would enhance the visible experience of the existing dashboard, if the dashboard would be refactored to use your libraries.

@TLINDEN

TLINDEN commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Nice, are you aware of the cluster dashboard command ?

Oh, no I'm not. But now that I looked at it: it doesn't provide the kind of views I intend with the watch ui.

I think your effort should be part of that and the dashboard could be the starting point to inspect the details of a single cluster.

Maybe event better, your usage of a more modern tooling would enhance the visible experience of the existing dashboard, if the dashboard would be refactored to use your libraries.

This is a sound idea, so what's the plan? Ditch this PR and re-implement the dashboard based on this work? Or keep both views in the code until someone managed to re-implement the dashboard?

@majst01

majst01 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Nice, are you aware of the cluster dashboard command ?

Oh, no I'm not. But now that I looked at it: it doesn't provide the kind of views I intend with the watch ui.

I think your effort should be part of that and the dashboard could be the starting point to inspect the details of a single cluster.
Maybe event better, your usage of a more modern tooling would enhance the visible experience of the existing dashboard, if the dashboard would be refactored to use your libraries.

This is a sound idea, so what's the plan? Ditch this PR and re-implement the dashboard based on this work? Or keep both views in the code until someone managed to re-implement the dashboard?

What about telling your KI to refactor the dashboard with the tooling in your cluster watch implementation, i thinks this should be possible in a matter of minutes.

@TLINDEN

TLINDEN commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

What about telling your KI to [..]

savetheplanet

I am the guy on the right side, so, sorry, but no "KI" for me.

PS: but let's be serious: I looked at the dashboard, it does something entirely different. It shows the status of the whole fleet of clusters (filterable by certain criterias). So, yes the dashboard could be re-implemented using bubbletea/lipgloss (and ntcharts), but I honestly think, the cluster watch should still be a separate command.

@majst01

majst01 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Some linter errors must be fixed though

@Gerrit91

Copy link
Copy Markdown
Contributor

Great effort!

I am also not sure if we should really add a dedicated command along with dashboard as to me this goes into a very similar direction and it would be weird to have different TUI experiences built on different dependencies within cloudctl.

We can have a session on consolidating the ideas such that we can turn this into a more comprehensive user experience (probably more K9s like with the current dashboards as alternative list views).

@majst01

majst01 commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Great effort!

I am also not sure if we should really add a dedicated command along with dashboard as to me this goes into a very similar direction and it would be weird to have different TUI experiences built on different dependencies within cloudctl.

We can have a session on consolidating the ideas such that we can turn this into a more comprehensive user experience (probably more K9s like with the current dashboards as alternative list views).

I made a PR to integrate it into the dashboard #399

@TLINDEN

TLINDEN commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

Small enhancements done:

  • fixed linter issues
  • fixed error view (now rendering as plain text in a centered box)
  • normal view reduced, previous view is now wide view, toggleable with w

Normal view:

short

Wide view:

wide

Error view:

errors

@TLINDEN TLINDEN mentioned this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants