Kubernetes Pod Disk Usage Listing
Description
This project is a tool for listing the disk usage of pods running in a Kubernetes environment. It contains the necessary functions to display the disk usage of pods on a specific node.
In a Kubernetes environment, monitoring the disk usage of pods is crucial for maintaining optimal performance and resource allocation. This tool helps administrators quickly identify which pods are consuming significant disk resources, allowing for better management and troubleshooting.
Features
- Display disk usage of pods on a specific node.
- Optionally list pods within a specific namespace.
- List disk usage of nodes.
Requirements
- Go 1.16 or higher
- Kubernetes Go Client
- Appropriate permissions for accessing the Kubernetes API
Installation
-
Clone the repository:
git clone <repo-url>
cd <repo-directory>
-
Install the necessary dependencies:
go mod tidy
-
Run the application:
go run main.go
Usage
The application uses the listNodesDiskUsage
function to display the disk usage of a specific node. This function lists all nodes and calls the getPodDiskUsage
function for each node. The user may specify a particular namespace if desired.
Contributing
If you would like to contribute, please create a pull request or report issues.