ntop is an open-source tool designed to provide clear and visual insights into the status of nodes and pods in your Kubernetes cluster. Leveraging Kubernetes' metrics server, ntop fetches and displays real-time CPU and memory utilization metrics in an easy-to-consume command-line interface.
Go
(1.16 or later)- Access to a Kubernetes cluster
- Kubernetes configuration file (usually at
~/.kube/config
)
Clone the repository and build the tool:
git clone https://github.com/devopswe/ntop
cd ntop
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ntop-linux-64-0.2.0
Ensure the metrics-server is installed on your cluster:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
Note: If you encounter SSL/TLS errors, modify
components.yaml
to include the--kubelet-insecure-tls
flag.
Run ntop:
./ntop-linux-64-0.2.0 --kubeconfig=path/to/your/kubeconfig
Optional flags:
--pods
: Switch to pods view.--countpods=<number>
: Specify the number of pods to display (default is 10).
- Real-time CPU and memory usage metrics for nodes and pods.
- Toggle between node and pod views with ease.
- Customize the number of pods displayed.
- Simple and intuitive command-line interface.
- New live table display of nodes and pods.
--pods
flag to easily switch to pod metrics.--countpods
flag to specify the number of pods displayed.- Improved performance and reduced waiting times.
- Instantaneous pod data retrieval with the new concurrent structure.
- Cross-platform availability: Windows, Linux, MacOS (Intel & ARM).
Special thanks to @dbtek and @faruktoptas for their contributions!
k8s.io/client-go
andk8s.io/metrics
for Kubernetes interaction.
Use go mod tidy
to manage dependencies.
Our vision for ntop includes:
- Modularization: Refactor for maintainability and scalability.
kubectl
Plugin: Enhance accessibility and integration.- Enhanced Filtering: Customize data display based on user preferences.
- Trend Analysis: Introduce historical data tracking and analysis.
- Interactive UI: Develop a terminal-based interactive UI.
- Support Additional Resources: Extend monitoring to more Kubernetes resources.
Contributions are welcome! Please follow the standard PR process for your contributions.
Licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Enhance your Kubernetes monitoring with ntop. Try it out and let us know your thoughts!