# go-k8s-btop A terminal-based Kubernetes resource monitor, similar to htop/btop but for Kubernetes pods. ## Features - List all pods in specified namespaces with their statuses - Monitor CPU and memory usage with graphical bars - Display logs from starting or restarting pods - Color-coded status indicators (green for running, yellow for pending, red for failed) - Live updates with configurable refresh interval - Keyboard shortcuts for navigation and display options ## Installation Clone the repository and build: ```bash git clone https://github.com/matst80/go-k8s-btop.git cd go-k8s-btop go build ``` ## Usage ``` ./go-k8s-btop [options] ``` ### Command-line Options - `-kubeconfig string`: Path to the kubeconfig file (default: "~/.kube/config") - `-namespaces string`: Comma-separated list of namespaces to monitor (default: "dev,home,cart") - `-refresh int`: Refresh interval in seconds (default: 5) ### Keyboard Shortcuts - `q` or `Ctrl+C`: Quit the application - `r`: Manually refresh the display - `h`: Toggle help screen ## Examples Monitor default namespaces with default settings: ```bash ./go-k8s-btop ``` Monitor specific namespaces: ```bash ./go-k8s-btop -namespaces=kube-system,default ``` Use a custom refresh interval: ```bash ./go-k8s-btop -refresh=10 ``` ## Requirements - Go 1.18 or higher - A valid kubeconfig with access to the Kubernetes API - Metrics API enabled in your Kubernetes cluster (for CPU/Memory usage) ## License MIT