// blog › kubernetes
KUBERNETES · USING ARCHHY
StatefulSet diagrams: prompt pod identity and per-pod storage
On this page
- Keep ordinal pod identities visible.
- Give each member its own PersistentVolumeClaim.
- Label replication as an application concern, not an automatic storage property.
A Kubernetes StatefulSet diagram should make stable identity and storage ownership easy to inspect. This example draws three members of a generic stateful application, then deliberately separates discovery, volume mounts and application replication.
Part 4 of our Kubernetes prompting series. The diagram below is an authored Archhy example of the brief, not a claimed output from a particular AI model. Open it in the editor to inspect and adapt the native objects.
The prompt
Draw a three-member stateful application in namespace records. Include one StatefulSet, three ordinal pod identities, a headless Service for discovery and one PersistentVolumeClaim per pod. Label each mount. Show application-level replication only between the members, with a note that its protocol is outside this view. Separate workload management, discovery and storage relationships. Do not imply that claims automatically replicate data.
On a computer, use AI → Generate with AI, Cloud: Auto, then Generate and Save. On a phone, AI → Generate applies the result with Undo available. Keep a copy of existing work before generating. Use an available configured model; results need inspection and may differ from this authored example.
Read each member vertically
The three columns show records-0, records-1 and records-2, each above its own claim. Mount arrows point from the pod to the claim it uses. This alignment helps a reader notice if two members accidentally appear to share one volume. StorageClass, provisioned volume details and underlying disks are omitted from the main view; add a storage-specific diagram if those are the review question.
Separate discovery from replication
A headless Service sits above the members with labelled discovery relationships. The StatefulSet management arrows also stay above the runtime lane. Application replication appears between members with a deliberately unspecified protocol. The picture does not declare a leader-election mechanism, quorum rule or database product. Those choices cannot be inferred from the fact that the workload is a StatefulSet.
Prompt for relationships, not a database logo
A request for a highly available database often produces three attractive cards with no explanation of state. This brief instead names identities, claim ownership and the fact that replication belongs to the application. It gives the reviewer concrete questions: which member writes, what happens during recovery, and which persistent data survives replacement? None of those questions is answered by drawing three replicas alone.
Choose the next level of detail
If the application has a documented replication topology, replace the illustrative relationships with that topology and label direction explicitly. Keep backup destinations in a separate recovery view until the write path is clear. When comparing a Deployment with a StatefulSet, explain the required identity and storage semantics rather than suggesting that one controller is always the production choice.
The storage review should identify the actual provisioning and recovery assumptions before adding claims about resilience. Keep one member replacement separate from regional disaster recovery: they are different questions. If a reviewer asks where a replacement obtains its data, add that documented relationship or mark it unresolved instead of extending the replication line by guesswork.
Check the result
- Each pod mounts the intended claim.
- Discovery and replication use different labels.
- The diagram makes no unsupported durability or availability promise.
Inspect every arrowhead at both canvas and exported size. Solid blue rails show the operation named by their labels; dashed purple rails show management or configuration. Other colours are explained by the diagram legend. A rail describes a logical relationship, not necessarily a literal network hop.
Try one precise edit
Keep all members and claims. Replace the replication labels with protocol unspecified and add a note asking which member accepts writes. Do not invent a leader.
Use Edit with AI with Preserve layout on. Check the result against the previous diagram, undo if needed, then save the native version you want to keep. The diagram is an explanation aid, not executable configuration or a deployment check.
Continue the series
All ten prompts and the prompting method. Previous: KEDA queue workers: prompt scaling without confusing message flow. Next: CronJob architecture: prompt a retry-safe scheduled export.
Frequently asked questions
Does a StatefulSet automatically replicate data?
No. Application replication needs its own implementation and must be described separately.
Why show a separate claim for each member?
It makes storage ownership visible and avoids implying that every replica mounts the same data volume.
based on Original Archhy teaching example, informed by official kubernetes.io documentation. The example assumptions are named in the article and diagram; it is not a reproduction of a reference deployment.

