A fast, interactive terminal-based Kubernetes dashboard built with Go and Bubble Tea. Monitor and manage your Kubernetes resources in real-time without leaving your terminal.
- Real-time monitoring - Auto-refresh every 2 seconds (configurable)
- Multiple resource types - Pods, Deployments, StatefulSets, Services, Ingresses, ConfigMaps, Secrets
- Interactive navigation - Tab between resources, arrow keys for selection
- Resource management - Delete resources with confirmation dialog
- Log viewing - Stream logs from pods and deployments
- Namespace switching - Quick namespace selector with filtering
- Color-coded status - Visual indicators for resource health and metrics
- Smart column layout - Dynamic sizing with important info always visible
- Word wrap toggle - Switch between full and truncated display
- Keyboard-driven - Full keyboard shortcuts for all operations
- Clean interface - Minimal, distraction-free design
- Loading states - Clear feedback for async operations
go install github.com/HamStudy/kubewatch/cmd/kubewatch@latest# Clone the repository
git clone https://github.com/HamStudy/kubewatch.git
cd kubewatch
# Build
make build
# Or build for specific platform
make build-linux
make build-darwin
make build-windows# Build all platforms
goreleaser build --snapshot --clean
# Create a release
goreleaser release --snapshot --clean# Use current kubectl context
kubewatch
# Specify namespace
kubewatch --namespace production
# Use a specific context
kubewatch --context production
# Use multiple contexts (multi-context mode)
kubewatch --context prod,staging,dev
# Custom refresh interval (in seconds)
kubewatch --refresh-interval 5
# Specific kubeconfig
kubewatch --kubeconfig ~/.kube/other-configTab/Shift+Tab- Switch between resource types↑/k- Move selection up↓/j- Move selection downPgUp/PgDn- Page up/downHome/g- Go to first itemEnd/G- Go to last item
Enter/l- View logs (for Pods/Deployments)d- Delete selected resource (with confirmation)n- Open namespace selectoru- Toggle word wrapr- Manual refresh?- Show helpq/Ctrl+C- Quit
↑/↓- Scroll logsPgUp/PgDn- Page through logsHome/End- Jump to beginning/endEsc/q- Return to resource view
↑/↓- Navigate namespaces/- Focus search fieldEnter- Select namespaceEsc- Cancel
kubewatch [flags]
Flags:
--context string Kubernetes context(s) to use. Single: 'prod' or Multiple: 'prod,staging,dev'
--namespace string Kubernetes namespace (default: from current context)
--kubeconfig string Path to kubeconfig file (default: $HOME/.kube/config)
--refresh-interval int Auto-refresh interval in seconds (default: 2)
--context-file string File containing list of contexts (one per line)
--help Show help messageKUBECONFIG- Path to kubeconfig fileKUBEWATCH_NAMESPACE- Default namespace
- Go 1.21 or higher
- Access to a Kubernetes cluster
- Make (optional, for using Makefile)
golang-implementation/
├── cmd/
│ └── kubewatch/ # CLI entry point
├── internal/
│ ├── core/ # Core types and state management
│ ├── k8s/ # Kubernetes client and operations
│ └── ui/ # Terminal UI components
│ └── views/ # Individual view components
├── docs/ # Documentation
├── Makefile # Build automation
├── go.mod # Go module definition
└── .goreleaser.yml # Release configuration
# Run tests
make test
# Build binary
make build
# Run locally
make run
# Clean build artifacts
make clean# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./internal/k8s- Search/filter in resource view
- Multi-selection for bulk operations
- Context switching (multiple clusters) - Use
--context prod,staging,dev - Column configuration (hide/show)
- Aggregated logs for deployments
- Persistent preferences
- Log search functionality
- Export resources to YAML
- Resource editing capabilities
- Custom resource support
- Implement SharedInformerFactory for efficient watching
- Optimize rendering for large resource lists
- Add caching layer for resource metadata
# Check kubectl connectivity
kubectl cluster-info
# Verify kubeconfig
export KUBECONFIG=/path/to/config
kubewatch- Increase refresh interval:
--refresh-interval 10 - Check network latency to cluster
- Ensure sufficient terminal size
- Minimum terminal size: 80x24
- Use a terminal with 256 color support
- Try toggling word wrap with
ukey
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Bubble Tea - A powerful TUI framework
- Inspired by k9s and other Kubernetes TUI tools
- Uses client-go for Kubernetes API interactions
For issues, questions, or suggestions, please open an issue on GitHub.