#k8s #kubernetes

app suspicious-pods

Prints a list of k8s pods that might not be working correctly

11 releases (2 stable)

1.1.0 Jan 14, 2021
1.0.0 Apr 9, 2020
0.6.0 Dec 11, 2019
0.5.2 Nov 30, 2019
0.1.0 Oct 27, 2019

#71 in Development tools

Download history 11/week @ 2021-02-20 2/week @ 2021-02-27 33/week @ 2021-03-20 23/week @ 2021-03-27 23/week @ 2021-04-03 19/week @ 2021-04-10 63/week @ 2021-04-17 5/week @ 2021-04-24 12/week @ 2021-05-01 2/week @ 2021-05-08 23/week @ 2021-05-15 2/week @ 2021-05-22 12/week @ 2021-06-05

72 downloads per month

Apache-2.0

27KB
311 lines

Suspicious pods

crates.io

Suspicious pods is a very simple tool, which does a very simple task: print a list of pods in your Kubernetes cluster that might not be working correctly, along with a reason on why that pod is considered suspicious.

Example:

$ suspicious-pods --help
suspicious-pods 1.0.0
Prints a list of k8s pods that might not be working correctly

USAGE:
    suspicious-pods.exe [FLAGS] <namespace>

FLAGS:
        --all-namespaces    Set this flag to scan all namespaces in the cluster
    -h, --help              Prints help information
    -V, --version           Prints version information

ARGS:
    <namespace>    The namespace you want to scan [default: default]
    
$ suspicious-pods

fluentd-aggregator-0/fluentd-aggregator                         Restarted 6 times. Last exit code: 1. (Error)
fluentd-dgjm8/fluentd                                           Waiting: PodInitializing
jaeger-es-index-cleaner-120860-jd7b4/jaeger-es-index-cleaner    Waiting: ImagePullBackOff
jaeger-operator-5545d554cb-mf5zt/jaeger-operator                Restarted 3 times. Last exit code: 137. (OOMKilled)
thanos-store-gateway-0                                          Stuck on init container: wait-for-prometheus

This is useful in big deployments, when you have a large number of pods and you just want to get a quick glimpse of what might be failing in your cluster.

Installation

Option 1: Precompiled binaries

Head to the release page and download your binary. There are binaries for Windows, Linux and MacOS. On Windows, you need to have OpenSSL installed on your machine. You can install it through vcpkg

Option 2: Cargo

Install rustup and run cargo install suspicious-pods. If you are on Windows, you need to have OpenSSL installed on your machine through vcpkg and set the environment variable VCPKGRS_DYNAMIC=1.

Feedback

Feedback and contributions are welcome! Please open an issue or a PR.

Dependencies

~80MB
~1.5M SLoC