Skip to content

kubeprc (Kubernetes Pod Restart Checker) is a lightweight CLI tool designed to help DevOps and SRE teams quickly detect containers that exceed a specified restart threshold in a Kubernetes namespace.

License

Notifications You must be signed in to change notification settings

linuxhandbook/kubeprc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubeprc Logo

KubePRC

kubeprc (Kubernetes Pod Restart Checker) is a lightweight CLI tool designed to help DevOps and SRE teams quickly detect containers that exceed a specified restart threshold in a Kubernetes namespace.

It automatically connects using in-cluster configuration or falls back to the local kubeconfig file, making it ideal for use in both production and development environments.


Features

  • 🔍 Scan Kubernetes namespaces for pod restart counts.
  • 📊 Identify containers exceeding a custom threshold.
  • 🧩 Works in-cluster and with local kubeconfig.
  • ⚡ Fast and easy to integrate into health checks or CI pipelines.

Installation

Linux & macOS

  1. Download and extract the binary:
    tar -xvzf kubeprc-<version>.tar.gz
  2. Move the binary to a directory in your PATH:
    sudo mv ./kubeprc /usr/local/bin/
  3. Check the version:
    kubeprc --version

Windows

  1. *Extract the .tar.gz using tools like 7-Zip.
  2. Move kubeprc.exe to a directory in your PATH.
  3. Run:
     kubeprc.exe --version

Usage

To run the tool and check pods in a namespace:

kubeprc --namespace dev --threshold 5

If any containers have restart counts above 5, they will be listed in the output.

Sample Output

Pods over restart threshold:
Namespace: dev, Pod: api-74df57ff8c-xjtd9, Container: app, RestartCount: 6
Namespace: dev, Pod: db-6c6b6795c7-hs9q4, Container: postgres, RestartCount: 8

CLI Options

Flag Shorthand Default Description
--namespace -n default Namespace to check for pod restarts.
--threshold -t 3 Restart count threshold. Containers exceeding this will be shown.
--version -v false Prints the current version and exits.

Contribution Guidelines

We welcome contributions to improve and enhance kubeprc!

✅ File Issues or Suggestions ✅ Submit PRs with tested code ✅ Follow clear and concise commenting practices


Community & Support

Stay connected with the community and get the latest updates:

🌐 LinkedIn- kubeprc

⭐ Star the repo to show support!

Buy Me a Coffee if you find this tool useful.

About

kubeprc (Kubernetes Pod Restart Checker) is a lightweight CLI tool designed to help DevOps and SRE teams quickly detect containers that exceed a specified restart threshold in a Kubernetes namespace.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published