Kubetui is a terminal user interface (TUI) tool designed for monitoring Kubernetes resources.
It provides an easy-to-use interface for developers and operators to access important information about their applications and infrastructure.
Kubetui is a terminal user interface (TUI) tool designed for real-time monitoring of Kubernetes resources, enabling developers and operators to access critical information about their applications and infrastructure with ease.
Key Features:
Real-time monitoring of Kubernetes pods and container logs, with the ability to toggle between JSON and single-line display modes.
Customizable pod columns via CLI flags or config presets, allowing users to tailor the view according to their needs.
Dynamic column selection for runtime customization, enhancing flexibility in resource monitoring.
Support for monitoring ConfigMaps, secrets, network resources, and events, providing comprehensive insight into cluster activity.
Clipboard/text copy functionality and mouse event support for a seamless user experience.
Audience & Benefit:
Ideal for developers and Kubernetes operators seeking an efficient way to monitor and manage their clusters. Kubetui streamlines workflows by offering a user-friendly interface that simplifies resource exploration and monitoring, ultimately improving operational efficiency.
Installable via winget on Windows, Kubetui is a powerful tool designed with a focus on practicality and usability in Kubernetes environments.
README
kubetui
Kubetui is a terminal user interface (TUI) tool designed for monitoring Kubernetes resources.
It provides an easy-to-use interface for developers and operators to access important information about their applications and infrastructure.
Kubetui offers the following features to help you monitor and manage your Kubernetes resources:
Pods List and Container Logs:
View a list of pods and their container logs.
JSON logs display mode switching: toggle between pretty print and single-line display using the f or p keys.
Customizable pod columns (via CLI flags or config presets): Use --pod-columns or --pod-columns-preset to control which columns appear in the pod list view. Also supports dynamic selection at runtime.
Dynamic column selection: You can now customize pod columns at runtime using a column selection dialog. Press t while the pod table is focused to open the dialog. Selected columns are immediately applied.
ConfigMap and Secret Watching: Monitor ConfigMaps and secrets, and decode their data.
Network-related Resources: Explore a list of network-related resources and their descriptions.
Events Watching: Stay updated with a real-time view of Kubernetes events.
Specific Resources Watching (List / YAML): View specific resources in list or YAML format.
Namespace Multiple Selections: Select and view multiple namespaces simultaneously.
Context Selection: Change the Kubernetes context you want to operate on.
Clipboard Support (Text Copy): Copy text conveniently using mouse actions.
Mouse Event Support: Leverage mouse events for a smoother user experience.
Search Functionality: Easily search for specific keywords within the interface.
Item Filtering: Filter items based on multiple keywords separated by spaces.
(beta) Customizable UI Appearance: Modify the appearance of the UI, including border styles, colors, and text attributes.
Overall, kubetui is a powerful tool designed to provide a safe and efficient way to access and monitor your Kubernetes resources. With its user-friendly interface and comprehensive features, it simplifies the process of managing your applications and infrastructure.
Installation
To install kubetui, you can use the following methods:
Kubetui is available on Chocolatey, the package manager for Windows. Install it by running the following command:
choco install kubetui
openSUSE Tumbleweed
For openSUSE Tumbleweed, you can install kubetui using the zypper package manager. Run the following command to install:
zypper install kubetui
Using cargo install
Kubetui is available on crates.io, the official Rust package registry. Install it by running the following command:
cargo install kubetui
Make sure you have Rust and Cargo installed before running the command.
Downloading the binary
Alternatively, you can download the precompiled binary from the GitHub Release page that matches your operating system. Once downloaded, you can run the binary directly without any additional installation steps.
Choose the method that suits your needs and preferences.
Usage
kubetui
$ kubetui -h
An intuitive Terminal User Interface (TUI) tool for real-time monitoring and exploration of Kubernetes resources.
Usage: kubetui [OPTIONS] [COMMAND]
Commands:
completion Generate completion script
Options:
-h, --help Print help
-V, --version Print version
-A, --all-namespaces[=] Select all namespaces [default: false]
-c, --context Context
-C, --kubeconfig kubeconfig path
--config-file Config file path
-l, --logging Logging
-n, --namespaces Namespaces (e.g. -n val1,val2,val3 | -n val1 -n val2 -n val3)
--pod-columns Comma-separated list of columns to show in pod table (e.g. name,status,ip). Use "full" to show all available columns
--pod-columns-preset Preset name for pod columns (e.g. "default", "full"). If both are specified, `--pod-columns` overrides this
-s, --split-direction Window split direction [default: v]
Pod Column Customization
Use --pod-columns to customize the columns displayed in the pod table.
Specify columns using a comma-separated list: --pod-columns=ready,status,age
Use full to show all available columns: --pod-columns=full
Notes:
The Name column is always included even if not specified.
The full keyword cannot be combined with other columns.
You can also customize columns dynamically at runtime:
Press t in the pod view to open the column selection dialog.
Use Space/Enter to toggle visibility and J/K to reorder columns.
Required columns like NAME are always enabled and fixed.
Define presets in config.yaml
You can define reusable column presets under pod.column_presets in your config file, and set a default preset with pod.default_preset.
Example config
theme:
pod:
# Name of the default preset to use at startup (optional)
default_preset: minimal
# Define named presets of pod columns
column_presets:
default:
- name
- status
- age
- ip
- node
minimal:
- name
- status
- age
To use a preset defined in your config file at runtime:
kubetui --pod-columns-preset=default
This will apply the preset named "default" defined in your configuration file.
If both --pod-columns and --pod-columns-preset are specified, --pod-columns takes precedence.
If neither is specified, the preset defined in pod.default_preset (if any) is used.
Shell Completion
Kubetui supports shell completion for Bash and Zsh. You can enable the completion by adding the following to your shell configuration file:
For Bash (add to ~/.bashrc or ~/.bash_profile):
source <(kubetui completion bash)
For Zsh (add to ~/.zshrc):
source <(kubetui completion zsh)
Custom Configuration
You can customize the UI appearance by specifying a configuration file using the --config-file flag:
kubetui --config-file /path/to/your/config.yaml
The configuration file can also be located at ~/.config/kubetui/config.yaml or $XDG_CONFIG_FILE/kubetui/config.yaml.
The configuration file allows you to modify various aspects of the UI, including:
Border Styles: Customize the border styles of different UI components.
Colors: Change the colors of text, backgrounds, and borders.
Text Attributes: Modify text attributes such as bold, italic, and underline.
A sample configuration file is available at examples/config.yaml to help you get started with customizing the UI.
Log Query
The Log Query feature empowers you to retrieve logs from multiple Pods and their containers. Using regular expressions, selectors, and specified resources, you can precisely define the log retrieval targets. This functionality also allows you to filter logs using regular expressions, providing a powerful and flexible log querying experience.
Usage Example
pod:app container:nginx log:401
When entering ? or help in the log query form, the help dialog will be displayed.
Supported Queries
Query
Alias
Description
pod:\
pods, po, p
Include Pods that match the regular expression in log retrieval target.
!pod:\
!pods, !po, !p
Exclude Pods that match the regular expression from log retrieval target. Can be defined multiple times.
container:\
containers, co, c
Include containers that match the regular expression in log retrieval target.
!container:\
!containers, !co, !c
Exclude containers that match the regular expression from log retrieval target. Can be defined multiple times.
log:\
logs, lo, l
Retrieve logs that match the regular expression. Can be defined multiple times.
!log:\
!logs, !lo, !l
Exclude logs that match the regular expression. Can be defined multiple times.
label:\
labels
Include Pods with labels matching the selector in log retrieval target. Cannot be specified with resource.
field:\
fields
Include Pods with fields matching the selector in log retrieval target.
/\
Include Pods belonging to the specified resource in log retrieval target. Cannot be specified with label.
Supported resources:
Resource
Alias
pod
po, pods
replicaset
rs, replicasets
deployment
deploy, deployments
statefulset
sts, statefulsets
daemonset
ds, daemonsets
job
jobs
service
svc, services
Query String Escaping
When including spaces in queries such as or, enclose the string with " or '. For example:
pod:"a b"
label:"environment in (production, qa)"
If you use ", ', or \ within the quoted string, escape them with \. For example: