Convert Kubernetes YAML into an architecture diagram.
The whole topology is in the YAML, expressed as label matches spread across forty files.
Selectors resolved into edges
The link between a Service and its pods is a label match, and label matches are exactly what humans misread: a selector matching nothing looks identical to one matching correctly. Resolving them and drawing the result makes an orphaned Service obvious immediately, which turns this from documentation into debugging.
Stateful separated from stateless
StatefulSets with volume claims land in the data tier rather than beside Deployments. That single distinction answers the question people most often bring to a cluster diagram, which is what can be restarted freely and what cannot.
Render templates first
A Helm chart full of unresolved values produces a diagram of the template rather than of the deployment. Rendering with your values first is the difference between a picture of the chart and a picture of the environment.
Fidelity
| Comes through | Does not | |
|---|---|---|
| Deployments, StatefulSets, DaemonSets | Components | |
| Services | Edges, resolved through selectors | |
| Ingress and Gateway | Edge tier entry points | |
| PVCs | Data tier attachment | |
| ConfigMap and Secret refs | Dependency edges | Secret values, obviously |
| Namespaces | Sections | |
| NetworkPolicy | Noted | Does not constrain drawn edges |
| Live cluster state | It reads files, not a cluster |
The prompt
Questions
Related
- Convert Code to a DiagramThe general case: point it at code and get a diagram of what is there rather than what you remember building.
- Convert a Diagram into CodeThe direction almost nothing else does: the diagram stops being documentation and becomes the instruction.
- Convert Terraform to an Architecture DiagramTerraform records dependencies explicitly through references, so the edges are read rather than inferred. It is one of the most reliable sources there is.
- Convert Mermaid to ExcalidrawUseful when a Mermaid diagram has outgrown what Mermaid's layout can render legibly.