Skip to content

CLI tool that fetches & displays pods and related information

Notifications You must be signed in to change notification settings

muratbiberoglu/k8s-pod-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

k8s-pod-watcher

A CLI tool that fetches & displays pods and related information.

⚠️ kubectl tool is required for using this script.

Usage

  • Fetching pods: python3 main.py fetch ...args
  • Configuration: python3 main.py config

For easier usage, a bash function that drives this script can be created. In order to do that below bash function can be added at the end of ~/.bashrc file (~/.zshrc in MACOS):

function pods() {
    python3 <<<path-to-main.py>>> "$@"
}

Then terminal session can be closed or following command can be executed: source ~/.bashrc. After these operations script can be run via below commands:

  • Fetching pods: pods fetch ...args
  • Configuration: pods config

Arguments for fetch command

patterns

Takes array of patterns for filtering pods.

-d or --detailed flag

Shows pods with detailed information such as age, restart count, cpu & memory usage etc.

-p or --prod flag

Shows pods in production environment. (By default it shows pods in development environment).

-w or --watch flag

Refreshes pod details periodically.

-n or --namespace option

Shows pods that are in given namespace. (If not given, the default namespace in the config.json file will be used).

About

CLI tool that fetches & displays pods and related information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages