Table of Contents
- Introduction
- Why We Built Fluid CLI
- Building the TUI Experience
- Installation
- Usage Guide
- Key Features
- Early Feedback: AI-Assisted Diagnosis in Practice
- Future Improvements
- Conclusion
Introduction
Fluid accelerates data access on Kubernetes by orchestrating distributed cache engines (Alluxio, JuiceFS, JindoFS, and others) behind a unified Dataset abstraction. Operating Fluid in production often means jumping between kubectl commands, controller logs, custom resources, and support threads to understand why a Dataset is stuck in NotBound or why a Runtime pod will not start.
We built Fluid CLI (fluid) to give operators and developers a focused, first-class command-line experience for Fluid workloads. Instead of assembling cluster state by hand, you can:
- Inspect a Dataset and its related Kubernetes resources in one place.
- Diagnose a Dataset by collecting a timestamped support bundle (YAML, events, logs, storage objects).
- Optionally run AI-assisted analysis that correlates symptoms with known Fluid failure patterns.
Fluid CLI is a standalone Go binary. It uses standard Kubernetes client configuration (kubeconfig, --context, -n) and does not require Fluid controllers to be modified.
Why We Built Fluid CLI
Before Fluid CLI, troubleshooting a misbehaving Dataset typically involved several disconnected steps:
- Fetch the Dataset and Runtime CRs with
kubectl get. - Find pods by labels and inspect
describeoutput. - Pull logs from FUSE or worker pods.
- Scan namespace events for warnings.
- Manually copy relevant YAML and logs into a GitHub issue or chat thread.
This workflow is slow, error-prone, and hard to repeat consistently across teams. We wanted a tool that:
- Reduces toil by automating resource discovery and artifact collection.
- Works in both interactive and scripted environments (terminal UI for humans, JSON/table/dir output for CI and support automation).
- Encodes Fluid-specific knowledge (Runtime types, label conventions, Dataset binding rules) so users do not have to memorize them.
- Supports modern troubleshooting workflows, including structured context export and optional LLM analysis for complex incidents.
Fluid CLI is intentionally scoped: it does not install Fluid, deploy applications, or manage cluster lifecycle. It complements kubectl and the Fluid documentation by answering one question well — "What is going on with this Dataset right now?"
Building the TUI Experience
We built four Bubble Tea programs, each with a focused scope:
| Program | Package | Trigger |
|---|---|---|
| Dataset picker | pkg/tui/datasetselect | fluid inspect -n <ns> (no dataset name) |
| Inspect viewer | pkg/tui/inspect | fluid inspect <name> (default -o tui) |
| Diagnose viewer | pkg/tui/diagnose | fluid diagnose <name> (default -o tui) |
| LLM config form | pkg/tui/diagnoseconfig | fluid diagnose config |
Navigation model
Inspect and diagnose viewers share the same interaction pattern:
- Three tabs — switched with
Tab/Shift+Tab(orh/l). - Scrollable tables — arrow keys and
j/kwithin table tabs. - Quit —
q,Esc, orCtrl+C.
Inspect tabs: Overview | Resources | DataOps
Diagnose tabs: Overview | Artifacts | Warnings
The overview tab shows a text summary (Dataset phase, conditions, mount points, or diagnose summary.txt). Table tabs render collection status and warning events parsed from the manifest.
Inspect — Overview shows Dataset phase, mounts, conditions, and Runtime status in one screen:

Inspect — Resources lists related Pods, StatefulSets, DaemonSets, PVCs, and PVs:

Inspect — DataOps surfaces DataLoad and related operations for the Dataset:

Diagnose — Artifacts browses the collected support bundle, including per-file status and failure reasons:

State management
Each TUI is a self-contained Bubble Tea model. State lives in the model struct (activeTab, table models, terminal dimensions). Window resize messages recalculate table heights so layouts adapt to the terminal size.
The diagnose command collects artifacts to disk before launching the TUI. The viewer reads summary.txt and manifest.json from the output directory — the TUI is a read-only browser over collected data, not a live cluster watch.
Challenges
- Terminal detection: Scripts and CI pipelines must not hang waiting for keyboard input. We gate TUI entry with
EnsureInteractive()and document non-TUI flags (-o dir,-o table,-o json). - Partial failures: Real clusters produce incomplete bundles. The diagnose TUI surfaces partial failure counts and per-artifact status so operators know what is missing before sharing a bundle.
- Consistent styling: Shared helpers in
pkg/tui/common(title, tabs, panel, table factory) keep inspect and diagnose visually aligned without a heavy design system.
Installation
Fluid CLI is installed from source today. There is no Homebrew formula or fluid install subcommand in the repository at the time of writing.
From source (recommended)
git clone https://github.com/fluid-cloudnative/fluid-cli.git
cd fluid-cli
make install-plugin
fluid --help
make install-plugin builds bin/fluid and copies it to a directory on your PATH.
Manual install
make build
cp bin/fluid /usr/local/bin/fluid # or any directory on your PATH
Prerequisites
- A Kubernetes cluster with Fluid installed (CRDs and controllers running).
- A working kubeconfig (
kubectlshould succeed against the cluster). - For TUI modes: a real terminal (not a pipe-only CI job).
Verify
fluid version
fluid inspect --help
fluid diagnose --help