How rsidarte/k8s-pod-analyzer works
k8s-pod-analyzer reports Kubernetes pod health from saved JSON and can separately diagnose problematic pods from a live cluster using Claude. The documented workflows are file-based reporting and live-cluster diagnosis; the shared counting helper supports report aggregation. The GitHub API script is outside the README-described product. Relationships reflect the excerpts and README; no unsampled implementation is assumed.
Main entry points: llm.py Diagnosis entry · analyse.py Health report · pods.json Pod JSON · outils.py Grouping counts
Components 15
Inputs
- Pod JSON
pods.json - kubectl
Pod analysis
- Report entry
analyse.py - Pod parsing
analyse.py - Pod checks
analyse.py - Health report
analyse.py - Grouping counts
outils.py
AI diagnosis
- Diagnosis entry
llm.py - Live pod fetch
llm.py - Context building
llm.py - Claude API
- Diagnosis output
llm.py - Usage and cost
llm.py - Usage history
llm.py
Other components
- Operator
Connections 16
- Operator → Report entry: runs report
README.md - Operator → Diagnosis entry: runs diagnosis
README.md - Pod JSON → Report entry: provides input
README.md - Report entry → Pod parsing: parses JSON
analyse.py - Pod parsing → Health report: supplies pods
analyse.py - Health report → Pod checks: checks failures
analyse.py - Health report → Grouping counts: counts groups
analyse.py - Diagnosis entry → Live pod fetch: fetches pods
llm.py - Live pod fetch → kubectl: runs command
llm.py - Diagnosis entry → Pod parsing: parses response
llm.py - Diagnosis entry → Pod checks: selects pods
llm.py - Diagnosis entry → Context building: builds context
llm.py - Context building → Claude API: sends prompt
llm.py - Diagnosis entry → Diagnosis output: prints diagnosis
llm.py - Diagnosis entry → Usage and cost: reports usage
llm.py - Diagnosis entry → Usage history: appends usage
llm.py