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 bydiagnose --watchto 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 aReportis what gets rendered (text) or serialized (JSON). - output
- Report rendering.
textis for humans,jsonis the stable machine contract (seemodel::Report). - probe
- In-cluster connectivity probe.
- rules
- Rule catalog: one entry per finding id the analyzers can emit. It backs
the
rulescommand,docs/RULES.md, SARIF rule metadata, JUnit test cases, and--only/--skipfiltering. - 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