Building AI SRE in Public #9: Knowledge Graph
Read-only service topology as typed nodes/edges — Ingress, PVC, Secret/ConfigMap names, reverse impact — not a Secret CMDB or chat “who depends on what” folklore. Honest degraded when OTel/mesh are missing.
This is episode 9 of Building AI SRE in Public. Episode 8 kept namespace priors local and capped. Knowledge Graph answers the topology question operators ask before they touch anything: what connects to what, and who would feel it if this Service dies? Chat answers invent callers. Typed nodes and edges refuse to.
The claim
AI SRE needs a read-only relationship map — Services, EndpointSlice-backed pods, Ingress exposes, volume mounts (PVC / Secret / ConfigMap names), remembered deps, and reverse consumers — as JSON you can jq. That map biases investigate and plan blast radius. It does not auto-remediate, invent mesh callers, or upload topology to the cloud by default.
Two graphs, one honesty rule
| Investigation Graph (ep.6) | Knowledge Graph (this ep.) | |
|---|---|---|
| Question | How do we verify a finding? | What connects / who consumes? |
| Shape | Gated hops → Investigation | Nodes/edges → service-graph + impact |
| Proof | EvidenceRef / Unknowns | Static refs + optional OTel calls |
| Mutate | Never from soft-agree | Never from an edge alone |
Same temperament: refuse fiction. Kubernetes does not record “who called this Service” by itself. Missing OTel or mesh lands in degraded[] — not invented edges that make the picture prettier.
What ships (MVP)
- Service dependency graph: type: service-graph nodes/edges (T-059 · T-060)
- Ingress → Service exposes; Pod → PVC mounts; Pod → Secret/ConfigMap mounts by name only (AG-063 · AG-064)
- Reverse impact: who consumes / blast radius → Investigation (S-005 · T-083)
- Namespace memory deps as heuristic edges — evidence, not proof (AG-015 · ep.8)
- CLI + agent dump: show service dependency graph · agent graph · who consumes …
Topology you can audit
kprompt "show service dependency graph" -n payments
kprompt agent graph -n payments
kprompt agent graph -n payments --ingress --pvc --volume-refs --network-policy
kprompt agent graph -n payments -o json
kprompt "who consumes redis" -n payments
kprompt "blast radius for payment-api" -n payments --output json
kprompt "impact of service api" -n productionImpact vs PlanResult blastRadius
| impact (live) | PlanResult.blastRadius | |
|---|---|---|
| Asks | What currently points at this object? | What will this proposed change touch? |
| When | Read / investigate | Before approve / apply |
| Artifact | Investigation | PlanResult |
Both are structural. Neither replaces approval. Simulation (change preview) may reuse the same relationships — still not chaos or capacity what-if as a product claim.
Secret honesty
Edges may say a Pod mounts Secret payments-db — the name. Values never enter the graph. That is a reality-anchor-shaped non-goal: topology without a Secret CMDB. ConfigMap names follow the same rule.
Privacy
Helm and laptop Observe agents do not upload topology to api.kprompt.ai. Knowledge stays where the kubeconfig or in-cluster SA already is — same privacy default as Cluster Memory.
What ships vs building
- Shipped: service-graph JSON; Ingress/PVC/volume-ref edges; reverse impact MVP; memory dep hints
- Shipped: Secret/ConfigMap name-only mounts; degraded honesty for OTel/mesh gaps
- Building: always-on external APIs / Kafka as first-class nodes; interactive Team /graph UI
- Exploring: ADR / docs2src as knowledge nodes (not a second chat brain)
- Non-goal: auto-remediation from edges; inventing runtime callers; replacing Prom/mesh/CMDB products
Try the map
Non-prod drill
# kind + dependency scenario
kprompt "show service dependency graph" -n payments -o json \
| jq '{type, nodes: (.nodes|length), edges: (.edges|length)}'
kprompt "who consumes redis" -n payments
# Prefer static edges + degraded[] over a model inventing callersIf your AI ops tool draws a pretty graph from narrative alone, you have wallpaper. Knowledge Graph MVP is plumbing: names, selectors, mounts, and honest gaps.
Next
Episode 10 is Autonomous SRE — and why we don’t want it yet. The series closes on the approval boundary, not a fleet of unsupervised remediations.
Related posts
Building AI SRE in Public #8: Cluster Memory
Namespace dependency facts that bias Observe without becoming root-cause proof. Local or in-cluster stores — never cloud dumps as fake authority — with AG-034 confidence caps.
Read articleBuilding AI SRE in Public #7: AI Timeline
Incident chronology as typed EvidenceRef[], not chat folklore. Events, rollout revisions, and HPA in one Investigation artifact — with honest degraded[] when Prom/OTel/mesh are missing.
Read articleBuilding AI SRE in Public #10: Autonomous SRE — and why not yet
Why unsupervised auto-remediation is not the destination. Observe by default, Autopilot propose-only, reality anchors, and investigate → plan → approve → verify as the load-bearing loop — not a fleet of agents that apply because the model sounded sure.
Read article