Skip to main content

Crate k8s_netinspect

Crate k8s_netinspect 

Source
Expand description

k8s-netinspect library

Kubernetes network diagnostics. A snapshot::ClusterSnapshot is collected (or loaded from disk), analysis::analyze turns it into a model::Report of findings, and output renders it.

Re-exports§

pub use errors::NetInspectError;
pub use errors::NetInspectResult;
pub use validation::Validator;

Modules§

analysis
Pure analysis over a ClusterSnapshot: no I/O, no clock, no API calls. Each submodule owns one check family and a block of stable finding ids.
commands
diff
Compare two diagnoses: what is new, what got resolved, what changed. Used by diff <before> <after> (incident before/after, upgrade verification) and by diagnose --watch to print only deltas.
errors
mcp
Model Context Protocol server over stdio, so coding and ops agents can query cluster network state.
model
Structured diagnostic model: every check produces Findings, and a Report is what gets rendered (text) or serialized (JSON).
output
Report rendering. text is for humans, json is the stable machine contract (see model::Report).
probe
In-cluster connectivity probe.
rules
Rule catalog: one entry per finding id the analyzers can emit. It backs the rules command, docs/RULES.md, SARIF rule metadata, JUnit test cases, and --only / --skip filtering.
snapshot
Cluster network snapshot: everything the analyzers need, captured once.
suggest
Remediation: the smallest NetworkPolicy that would let a blocked flow through. Suggestions are printed, never applied.
validation