StatefulSet — Database Cluster
Headless service + StatefulSet with ordered pods and persistent volumes.
Rendering…
Make it your own.
digraph sts {
rankdir=LR;
graph [bgcolor=transparent];
node [shape=box, style="rounded,filled", fontname=Inter, fontsize=10];
HS [label="Headless Service\n(db.default.svc)", fillcolor="#dbeafe"];
P0 [label="pod db-0\n(primary)", fillcolor="#fce7f3"];
P1 [label="pod db-1\n(replica)"];
P2 [label="pod db-2\n(replica)"];
V0 [label="PVC data-db-0", shape=cylinder, fillcolor="#fef3c7"];
V1 [label="PVC data-db-1", shape=cylinder, fillcolor="#fef3c7"];
V2 [label="PVC data-db-2", shape=cylinder, fillcolor="#fef3c7"];
HS -> P0; HS -> P1; HS -> P2;
P0 -> V0; P1 -> V1; P2 -> V2;
P0 -> P1 [label="replicate", style=dashed];
P0 -> P2 [label="replicate", style=dashed];
}