Kubernetes Cluster — Reladraw template

K8s 集群拓扑. Copy the source, paste into the official playground, done. No coordinates — every position is stated relative to something else.

Preview

kubectl kube-apiserver Ingress CoreDNS pod pod Service api

Source (.reladraw)

node kubectl "kubectl"
node api "kube-apiserver"  below kubectl
node ingress "Ingress"  below api  level with coredns
node coredns "CoreDNS"  right of ingress
node pod1 "pod"  below-left of ingress
node pod2 "pod"  below-right of ingress
node svc "Service"  below pod2
edge kubectl -> api "api"
edge api -> ingress
edge ingress -> svc
edge svc -> pod1
edge svc -> pod2

How to use

  1. Open the Reladraw playground
  2. Paste the source above — the diagram re-solves live
  3. Export SVG from the playground, or render locally: npx reladraw kubernetes-cluster.reladraw -o out.svg

When to use this template

Use this when explaining your cluster to someone who does not live in it: new teammates, a security reviewer, or a runbook. It shows the control-plane path (kubectl → apiserver) and how Ingress routes traffic down to pods through a Service.

It also works as the “before” picture in an incident post-mortem.

How to customize

  1. Split namespaces. Give pod nodes namespaced ids: node app.pod1 "pod" — compound ids render as grouped containers.
  2. Add an ingress controller detail. Insert node nginx "nginx-ingress" below ingress and rewire edge ingress -> nginx, edge nginx -> svc.
  3. Show external traffic. Add node user "End user" above kubectl and edge user -> ingress "https" from: top.

FAQ

How do I diagram a Kubernetes cluster?

Model each component — apiserver, Ingress, Services, pods — as a node, then place them along the request path: what a request hits first goes on top. This template follows that convention and renders in one paste.

How do I show pods in different namespaces?

Use dotted node ids like app.web and infra.jobs. Reladraw treats the prefix as a container, so each namespace becomes a visual box without extra syntax.

Can Reladraw show scaling, like 6 replicas?

Draw two or three pod nodes to suggest a replica set and label them pod-1, pod-2 — or one node labeled “pods ×6”. Explicit layout works best when the count is part of the label, not the topology.

Related templates

Network TopologyCI/CD PipelineUser Onboarding Flow