Skip to main content

A rich CLI Kubernetes monitor

Project description

KubMonitor Logo

KubMonitor CLI

A beautiful, nvitop-style Kubernetes monitor for your terminal.

PyPI Version Python Version License Build Status


✨ Overview

KubMonitor provides a real-time, high-fidelity dashboard for your Kubernetes clusters directly in your terminal. Inspired by tools like nvitop and btop, it combines cluster quotas with local machine metrics in a slick, responsive TUI (Terminal User Interface).

KubMonitor Demo

🚀 Features

  • 📊 Real-time Dashboard: Live updates of CPU, Memory, and GPU usage.
  • ⚡ Advanced GPU Monitoring: Auto-detects NVIDIA GPU models (H100, A100, V100, etc.) and visualizes detailed usage quotas.
  • 📜 Live Log Viewer: Integrated pod log viewer with auto-refresh capability.
  • ☸️ Namespace Scoped: Monitor specific Kubernetes namespaces with ease.
  • 💻 Hybrid Metrics: View both K8s Cluster Quotas and Local Machine stats side-by-side.
  • ✨ Reactive TUI: Built with Refreshed layouts using Rich.
  • 🖥️ Cross-Platform: Works seamlessly on Linux, macOS, and Windows.

📦 Installation

Install via pip:

pip install kubmonitor-cli

Or install from source:

git clone https://github.com/vios-s/kubmonitor-cli.git
cd kubmonitor-cli
pip install .

🎮 Usage

Getting Help

View all available options and usage information:

kubmonitor --help
# or
kubmonitor -h

Check the version:

kubmonitor --version
# or
kubmonitor -V

Monitor a Namespace

Simply run the command followed by the target namespace:

kubmonitor <namespace>

Example:

kubmonitor eidf098ns

If no namespace is specified, it defaults to default:

kubmonitor

Mock Mode (Testing/Debug)

For testing or debugging purposes without requiring access to a Kubernetes cluster, you can use the --mock flag to run KubMonitor with simulated data:

kubmonitor --mock

Note: When using --mock, you cannot specify a namespace. Mock mode uses generated test data and doesn't connect to a real cluster.

This will generate realistic mock data including:

  • Simulated HPC Cluster with H100/A100 GPU nodes.
  • Simulated resource quotas (CPU, Memory, GPU).
  • Mock Kubernetes jobs with various states (running, completed, failed).
  • Live simulated logs for debugging the viewer.
  • Mock pods with realistic resource usage patterns
  • Generated timestamps and durations

Keyboard Shortcuts

Key Description
/ Navigate up and down
q Quit the application
Ctrl+C Force Exit

🛠️ Technology Stack

  • Rich: For beautiful terminal formatting and layout.
  • Psutil: For retrieving local system metrics.
  • Kubectl: Under the hood, it uses your local kubectl configuration to fetch cluster data.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by yyx

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kubmonitor_cli-0.2.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kubmonitor_cli-0.2.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file kubmonitor_cli-0.2.2.tar.gz.

File metadata

  • Download URL: kubmonitor_cli-0.2.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kubmonitor_cli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 703c5439b30eb5dedbc11bd75694c1c9fdd48c7ed4031b100fd670dad9f0188c
MD5 0c703d881c6785b47152cd85aa17ea15
BLAKE2b-256 a88cd639e59912d9cd999a99be4bfa3983a96d2f01d49e688a70f6da6e2649e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubmonitor_cli-0.2.2.tar.gz:

Publisher: release.yml on vios-s/kubmonitor_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kubmonitor_cli-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: kubmonitor_cli-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kubmonitor_cli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f481bc00310a1bb1c5e4044215a2b50918e472644b61ab6377367702e8b7e6ce
MD5 975978cce8ab25a682eb12fea613a63e
BLAKE2b-256 2eb3df6069371baeec6d8881c50fd32479cfd4c74450bf2b791ae5559a7b63ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubmonitor_cli-0.2.2-py3-none-any.whl:

Publisher: release.yml on vios-s/kubmonitor_cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page