Skip to content
Graphviz (DOT) templates

Kubernetes Topology

Control plane, nodes, ingress, services, pods.

Template previewGraphviz (DOT)
Rendering…

Make it your own.

digraph K8S {
  rankdir=TB;
  graph [bgcolor="transparent", splines=ortho, fontname="Inter"];
  node [shape=box, style="rounded,filled", fontname="Inter", fontsize=11];

  Ingress [fillcolor="#fde68a", label="Ingress\n(NGINX)"];
  subgraph cluster_cp {
    label="Control Plane"; color="#1f47f5"; style="rounded,filled"; fillcolor="#eef4ff";
    APIS [fillcolor="white", label="kube-apiserver"];
    ETCD [fillcolor="white", label="etcd"];
    CM   [fillcolor="white", label="controller-manager"];
    SCH  [fillcolor="white", label="scheduler"];
  }
  subgraph cluster_n1 {
    label="Node 1"; color="#16a34a"; style="rounded,filled"; fillcolor="#ecfdf5";
    Pod1a [fillcolor="white", label="pod: api\n(2x)"];
    Pod1b [fillcolor="white", label="pod: worker\n(1x)"];
  }
  subgraph cluster_n2 {
    label="Node 2"; color="#16a34a"; style="rounded,filled"; fillcolor="#ecfdf5";
    Pod2a [fillcolor="white", label="pod: api\n(2x)"];
    Pod2b [fillcolor="white", label="pod: redis"];
  }
  Svc [fillcolor="#dbeafe", label="Service\n(ClusterIP)"];
  Ingress -> Svc;
  Svc -> Pod1a; Svc -> Pod2a;
  APIS -> ETCD;
  APIS -> CM; APIS -> SCH;
  APIS -> Pod1a [style=dashed, color="#94a3b8"];
  APIS -> Pod2a [style=dashed, color="#94a3b8"];
}