3JIou-home / k8s-search-pod

Just for fun cli tool for search in k8s pod by ip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Just for fun cli tool for searching pod by ip.

Build deb.

Set k8s api version. Cargo.toml set features for k8s-openapi (features = ["v1_22"])

k8s-openapi = { version = "0.15.0", default-features = false, features = ["v1_22"] }

Set env environment.

export DISTRO_RELEASE="rust-deb"
export DISTRO_NAME="1.59.0"
export PRIVATE_REPO="https://hub.docker.com"

Run build.sh

Usage

k8s-search-pod -a 10.250.1.1
+----------------+-----------------------------------------+----------------+-------------------------------+
| Request IP     | Pod name                                | Pod namespace  | Pod on node                   |
+----------------+-----------------------------------------+----------------+-------------------------------+
| 10.250.1.1     | test                                    | test-ns        | some-node-in-cluster          |
+----------------+-----------------------------------------+----------------+-------------------------------+

About

Just for fun cli tool for search in k8s pod by ip


Languages

Language:Rust 82.1%Language:Shell 17.9%