-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c18e2ed
commit 794e348
Showing
1 changed file
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
# kubectl-hoggers | ||
# Analyze resouce consumption in Kubernetes from your terminal | ||
Hoggers is a `kubectl` plugin that uses multiple Kubernetes API endpoints to show data about resource consumption in a Kubernetes cluster using only a terminal interface. | ||
|
||
## Usage | ||
This plugin uses the `KUBECONFIG` environment variable to access cluster data. It must be set for everything to work. | ||
|
||
Check CPU and RAM reservations/limits for each node in a cluster | ||
``` | ||
kubectl hoggers report | ||
``` | ||
|
||
List pods consuming most CPU resources in real time along with its corresponding nodes. Refreshes every 10 seconds and requires metrics-server. | ||
``` | ||
kubectl hoggers top | ||
``` | ||
|
||
Note: because of the way `kubectl` plugins work, running `kubectl hoggers` or `kubectl-hoggers` gives the same results. | ||
|
||
## Roadmap | ||
- [ ] allow `KUBECONFIG` to be set via command flag | ||
- [ ] output `report` to a file | ||
- [ ] add a namespace option to `report` | ||
- [ ] add table scroll in `report` | ||
- [ ] option to order by RAM in `top` | ||
- [ ] add animated GIFs to demonstrate usage | ||
|
||
## Development workflow | ||
I suggest using Docker for develping and build this plugin. | ||
|
||
## Development | ||
``` | ||
docker build -t kubectl-hoggers:dev -f compose/local/Dockerfile . | ||
docker run -it -v ${PWD}:/app kubectl-hoggers:dev bash | ||
docker run -it --rm -v ${PWD}:/app kubectl-hoggers:dev bash | ||
go install -v ./... && kubectl-hoggers | ||
``` |