K8s 网络流. Copy the source, paste into the official playground, done. No coordinates — every position is stated relative to something else.
node net "Ingress"
node svc "Service" below net
node pod1 "Pod A" below-left of svc
node pod2 "Pod B" below-right of svc
node netpol "NetworkPolicy" right of svc
edge net -> svc
edge svc -> pod1
edge svc -> pod2
edge netpol -> svc "restrict"npx reladraw k8s-networking.reladraw -o out.svgIngress to service to pods, with a NetworkPolicy edge restricting the path.. Use it when debugging cluster traffic — the policy edge shows who is allowed where.
node new_id 'New label' below anchor — placement is relative, so the solver re-flows the whole diagram instantly.edge a -> b 'your label' — labels are the fastest way to carry rates, protocols or percentages.below to right of rotates a branch sideways without touching any other line.Declare each box with node, connect them with edge, and state one position per node relative to another. Paste the source from this page into the official playground and it renders immediately.
Yes — the source is free to copy, modify and ship in docs, READMEs, books or client decks. No attribution required.
Render in the playground and export SVG, or run it locally: npx reladraw file.reladraw -o out.svg for CI-friendly builds.