k8p

Crates.iok8p
lib.rsk8p
version0.4.10
sourcesrc
created_at2023-07-09 03:15:55.607521
updated_at2023-11-05 20:16:26.088404
descriptionA cli tool for inspecting containers in Kubernetes
homepage
repositoryhttps://github.com/navicore/k8p
max_upload_size
id911811
size113,778
Ed Sweeney (navicore)

documentation

https://docs.rs/k8p

README

A CLI for Inspecting Containers in Kubernetes

Currently, the command will use a local kubecontext to access a cluster and get all the Prometheus data available from pods annotated for Prometheus using the convention:

      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/path: "/actuator/prometheus"
        prometheus.io/port: "8081"

The cli supports exporting the db to both N-Triple and Turtle RDF files.

Planned - formatted output and liveliness and readyness probe info in aggregated report form.

Install

#latest stable version via https://crates.io/crates/k8p
cargo install k8p

#or from this repo:
cargo install --path .

Configure for tab completion:

k8p generate-completion zsh > /usr/local/share/zsh/site-functions/_k8p

Usage

from k8p -h

A cli tool for inspecting containers in Kubernetes

Usage: k8p [OPTIONS] <COMMAND>

Commands:
  explain-pod <PODNAME>
  scan-metrics
  export-triples
  export-turtle
  report
  help            Print this message or the help of the given subcommand(s)

Options:
  -t, --ttl-rdf-filename <TTL_RDF_FILENAME>  export Turtle RDF file [default: k8p.ttl]
  -r, --rdf-filename <RDF_FILENAME>          export N-Triples RDF file [default: k8p.nt]
  -n, --namespace <NAMESPACE>                Name of the namespace to walk
  -d, --db-location <DB_LOCATION>            [default: /tmp/k8p.db]
  -h, --help                                 Print help
  -V, --version                              Print version

TODO

  1. list readiness and liveliness info and prometheus health port and path
  2. get probe health check info from ports
  3. get prometheus metrics check info from ports
  4. format output when -o yaml or -o json is used
Commit count: 186

cargo fmt