> ## Documentation Index
> Fetch the complete documentation index at: https://iso-topology.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubernetes architecture diagrams: requests and ownership

> Draw Kubernetes Service, Deployment, ReplicaSet, and Pod relationships in two editable diagrams. Download YAML, SVG, and PNG and reproduce them locally.

Draw a Kubernetes architecture diagram around one question at a time: **where can a request go, or which object manages these Pods?** Keeping those views separate avoids drawing a Deployment as a network hop. This tutorial provides two small, editable diagrams of the same illustrative application. [中文](https://iso-topology.mintlify.site/zh/examples/kubernetes-architecture.md).

The example assumes one ordinary selector-based Service and a Deployment with two Pod replicas in one namespace. It is an authored teaching model, not a cluster scan or an observed production deployment. The YAML downloads are **iso-topology diagram documents, not Kubernetes manifests**; do not pass them to `kubectl apply`.

## View 1: logical request routing

![Client connects through a Service abstraction to either Pod A or Pod B](https://mintcdn.com/iso-topology/GoLmplZH7FqZAkHg/assets/kubernetes-request.svg?fit=max\&auto=format\&n=GoLmplZH7FqZAkHg\&q=85\&s=bb1376b3d2ae769f4bcb7ea30c7b25f1)

[Editable YAML](../assets/kubernetes-request.yaml) · [Full SVG](../assets/kubernetes-request.svg) · [PNG](../assets/kubernetes-request.png)

**Arrow meaning: possible request direction.** The two outgoing arrows identify alternative backends; they do not mean that every request is broadcast to both Pods. The Client is an in-cluster caller in this example. All Kubernetes objects shown belong to the same illustrative namespace.

A Service can select Pods by labels; the backing endpoint information is maintained in EndpointSlices. The Service box represents the logical access abstraction, not a separate application process that every packet must traverse. See the official [Service documentation](https://kubernetes.io/docs/concepts/services-networking/service/).

EndpointSlices, DNS, the network implementation, readiness details, and response arrows are omitted to keep this a logical overview. Add them only when the question requires that detail. Do not insert Deployment or ReplicaSet between Service and Pod: that would mix request routing with workload management.

## View 2: controller ownership

![Deployment owns a ReplicaSet which owns Pod A and Pod B](https://mintcdn.com/iso-topology/GoLmplZH7FqZAkHg/assets/kubernetes-ownership.svg?fit=max\&auto=format\&n=GoLmplZH7FqZAkHg\&q=85\&s=d78ff0a348bffac0a085bb3e9b22c48e)

[Editable YAML](../assets/kubernetes-ownership.yaml) · [Full SVG](../assets/kubernetes-ownership.svg) · [PNG](../assets/kubernetes-ownership.png)

**Arrow meaning: owner to managed dependent.** Pod A and Pod B refer to the same conceptual replicas as in the request view; there are not four Pods. Ownership can be checked through `metadata.ownerReferences`; matching a Service selector is a different relationship. See [owners and dependents](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/).

This is a steady-state view with one active ReplicaSet. A Deployment rollout can involve old and new ReplicaSets at the same time, so use a separate rollout view when explaining replacement or version transitions. See [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/).

## Choose boundaries before adding icons

| Question | View to build | Evidence to check |
| - | - | - |
| Which backends can receive this request? | Service and backend view | Service selector, Pod labels, endpoint information |
| What maintains or replaces these Pods? | Ownership view | Deployment, ReplicaSet, owner references |
| Where are the Pods scheduled? | Node placement view | Pod scheduling information and Nodes |
| Which environment does an object belong to? | Namespace or cluster scope | Actual object namespace and cluster context |

A namespace boundary should represent object scope. Do not use it as a physical Node boundary: Kubernetes Nodes are cluster-scoped. The official [namespace documentation](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) explains this distinction. This example uses a written scope note rather than an extra box around every object.

## Reproduce and edit both diagrams

Use an [installed CLI](https://iso-topology.mintlify.site/getting-started/01-install.md), or build from the repository with Go 1.25 or later and Git:

```bash theme={"system"}
git clone https://github.com/NexusFox88/iso-topology
cd iso-topology
git rev-parse HEAD
go build -o isotopo ./cmd/isotopo
./isotopo validate docs/assets/kubernetes-request.yaml
./isotopo validate docs/assets/kubernetes-ownership.yaml
./isotopo render docs/assets/kubernetes-request.yaml ./out-request
./isotopo render docs/assets/kubernetes-ownership.yaml ./out-ownership
```

Record the revision when sharing results. On Windows, build and run `isotopo.exe`. The SVGs are `out-request/topology.svg` and `out-ownership/topology.svg`; each output directory also contains an HTML preview. Both sources use the isometric projection. To compare a flat view, run `./isotopo render --projection top docs/assets/kubernetes-request.yaml ./out-request-plan`. The published images are regenerated from their source.

To edit, first copy the source and then bind Studio to your copy:

```bash theme={"system"}
cp docs/assets/kubernetes-request.yaml my-request.yaml
./isotopo serve my-request.yaml
```

Studio saves accepted source changes to that file. After editing, render the copy again to update its exported SVG. You can also import the YAML into the [browser playground](https://nexusfox88.github.io/iso-topology/) for a small diagram without installing the CLI; export your edited source before leaving.

Try these changes:

1. Rename Service to `Catalog Service`, keeping the `service` ID so edges stay connected.
2. Add `pod_c` with a new position and a Service edge. Add the same replica to the ownership view if both views describe the same state.
3. Split a rollout into its own diagram rather than mixing old/new replicas into the request overview without explanation.

Check the result at its actual display size. A renderer can validate IDs and routes; it cannot establish that your Service selector, owner references, or live cluster state are correct. Keep the two source files and their scope notes together in review.

[Open-source tool selection](https://iso-topology.mintlify.site/guides/open-source-architecture-diagram-tools.md) · [Diagrams from code](https://iso-topology.mintlify.site/guides/architecture-diagrams-from-code.md) · [Microservices example](https://iso-topology.mintlify.site/examples/microservices.md) · [Publish diagrams](https://iso-topology.mintlify.site/getting-started/05-publishing.md)

To share the replica inventory and update both views through CI, use the [view-consistency example](https://iso-topology.mintlify.site/guides/keep-diagram-views-consistent.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.