Skip to content

A tool for monitoring peak CPU and memory usage of Kubernetes pods. Easily input pod names, start monitoring, and review peak usage statistics directly from the terminal.

License

Notifications You must be signed in to change notification settings

grieve54706/pod-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pod watcher

Kubernetes has a metrics server that provides CPU and memory usage statistics for pods. By default, these metrics are collected every 60 seconds. This interval can be adjusted using the --metric-resolution flag. However, it is not recommended to set values below 15 seconds, as this is the resolution of metrics calculated by Kubelet (reference1, reference2).

I created this tool to monitor CPU and memory usage and log the peak usage of pods.

Demo

demo

You can view the results similar to kubectl top pod.

NAME     CPU(cores)     MEMORY(bytes)
wren     13m            1450Mi

How to install

  • Requirement node 17
  • Clone repo
  • Install dependencies
    npm install

How to use

npm start

If you want to use this anywhere, you can install it globally.

npm install -g

You can run pod-watcher directly in the terminal from anywhere to start this tool.

About

A tool for monitoring peak CPU and memory usage of Kubernetes pods. Easily input pod names, start monitoring, and review peak usage statistics directly from the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published