- Rust 99.3%
- Just 0.4%
- Shell 0.3%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| .github | ||
| .idea | ||
| docs | ||
| examples | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy_output.txt | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
NaviPod
A comprehensive TUI and CLI for inspecting containers in Kubernetes clusters.
Overview
NaviPod provides a modern terminal interface for Kubernetes operations, built with Rust for performance and reliability. The tool uses local kubecontext credentials to access Kubernetes clusters and offers both interactive TUI and scriptable CLI modes.
Key Features
Terminal User Interface (TUI)
- Multi-view Navigation: Navigate between deployments, pods, containers, and logs
- Container Inspection:
- View environment variables, volume mounts, and resource limits
- Execute liveness, readiness, and startup probes and view results
- Inspect container logs with smart tailing and filtering
- Interactive Probe Testing:
- Support for HTTP, TCP, and Exec probe types
- Detailed response viewing with scrollable popup windows
- Log Viewer:
- Log streaming with tailing
- Log level detection and color coding
- Detailed log entry viewer
- Filtering and search capabilities
- Keyboard Navigation:
- Vim-style keybindings (j/k, g/G)
- Tab navigation between panels
Command Line Interface
- Pod Analysis: Report on pod external ingress configurations
- Metrics Collection: Gather Prometheus metrics from annotated pods
- RDF Export: Export cluster data to N-Triples or Turtle RDF formats
- Database Operations: Embedded database for offline analysis
- Shell Completion: Auto-completion support for bash and zsh
Architecture
- Async/Await: Non-blocking operations for responsive UI
- Modular Design: Clean separation between Kubernetes API, UI, and data layers
- Theme System: Customizable color schemes
- Error Handling: Comprehensive error handling with user-friendly messages
- Caching: Intelligent caching for improved performance
Prometheus Integration
NaviPod automatically discovers and collects metrics from pods annotated with:
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/actuator/prometheus"
prometheus.io/port: "8081"
Installation
From crates.io
cargo install navipod
From source
git clone https://github.com/navicore/navipod.git
cd navipod
cargo install --path .
Shell Completion
For zsh:
navipod generate-completion zsh > /usr/local/share/zsh/site-functions/_navipod
For bash:
navipod generate-completion bash > /etc/bash_completion.d/navipod
Usage
Interactive TUI
# Start the TUI with default namespace
navipod tui
# Start with specific namespace
navipod tui -n production
TUI Navigation
Tab/Shift+Tab: Switch between panelsj/kor↑/↓: Navigate listsEnter: Select item or execute probeg/G: Jump to top/bottom/: Search/filterESC: Go back or close popupq: Quit applicationc: Cycle color themes
CLI Commands
# Analyze pod ingress configuration
navipod explain-pod -n production
# Collect metrics to database
navipod scan-metrics -n production
# Export to RDF formats
navipod export-turtle -t cluster-data.ttl
navipod export-triples -r cluster-data.nt
# Show database statistics
navipod report
Command Options
Options:
-t, --ttl-rdf-filename <FILE> Export Turtle RDF file [default: navipod.ttl]
-r, --rdf-filename <FILE> Export N-Triples RDF file [default: navipod.nt]
-n, --namespace <NAMESPACE> Kubernetes namespace to inspect
-d, --db-location <PATH> Database location [default: /tmp/navipod.db]
-h, --help Print help information
-V, --version Print version information
Screenshots
Health Probe Inspection
Requirements
- Rust 1.89 or higher (for building from source)
- Valid Kubernetes configuration (
~/.kube/config) - Access to target Kubernetes clusters
Development Status
Active development - New features and improvements are regularly added. The project serves as both a practical Kubernetes tool and a platform for exploring Rust programming patterns.
Contributing
Contributions are welcome. Please ensure all changes maintain the existing code quality standards and pass the project's clippy lints.
Before pushing, run the full CI suite locally — the justfile is the single source of truth, and GitHub Actions invokes the same recipe:
just ci
just ci runs, in order:
fmt-check—cargo fmt --all -- --checklint— strict clippy (-D warnings -D clippy::pedantic -D clippy::nursery, plusunwrap_used/expect_useddenied in library code)test— library tests and cache integration tests (--locked)build—cargo build --locked --release
The toolchain version is pinned in rust-toolchain.toml and must match every CI workflow's dtolnay/rust-toolchain@master toolchain: input.
Releasing
Publishing to crates.io is automated. To cut a release:
- Create a GitHub release with a semver tag
X.Y.Z(e.g.,1.2.0) targetingmain. A leadingvis tolerated but the repo convention is bare numeric. - The
release.ymlworkflow will automatically:- Extract
X.Y.Zfrom the tag - Update
versioninCargo.tomlandCargo.lockto match - Commit the bump back to
mainasgithub-actions[bot] cargo publishto crates.io
- Extract
The version in Cargo.toml on main does not need to be bumped ahead of time — the release workflow is the source of truth.
Required repository secrets (Settings → Secrets and variables → Actions):
PAT— personal access token withcontents: writeon this repo; needed to push the version-bump commit back tomainCARGO_REGISTRY_TOKEN— crates.io API token from https://crates.io/settings/tokens
License
See LICENSE file for details.

