Mermaid exampleFlowchart

Kubernetes Deployment Flowchart: Ingress to Pods

A Kubernetes deployment flowchart maps the objects a request passes through inside a cluster. SREs draw it for runbooks so an on-call engineer can see at a glance which object to inspect when a URL returns a 503, and developers use it to understand why their app has three pods but one service address.

  • kubernetes architecture diagram
  • k8s deployment diagram
  • ingress service pod diagram
  • mermaid kubernetes
Kubernetes Deployment Flowchart: Ingress to Pods

Namespace: shop

Deployment: api (3 replicas)

Client

Ingress
api.example.com

Service
ClusterIP :80

Pod api-1

Pod api-2

Pod api-3

ConfigMap
app settings

Secret
database credentials

PersistentVolume
uploads

Open in editor → 16 linesrenders in GitHub, Notion, Obsidian

Mermaid code

flowchart TD
    C[Client] --> I[Ingress<br/>api.example.com]
    subgraph NS["Namespace: shop"]
        I --> S[Service<br/>ClusterIP :80]
        subgraph DEP["Deployment: api (3 replicas)"]
            P1[Pod api-1]
            P2[Pod api-2]
            P3[Pod api-3]
        end
        S --> P1
        S --> P2
        S --> P3
        CM[ConfigMap<br/>app settings] -.-> P1
        SEC[Secret<br/>database credentials] -.-> P1
        P1 --> PV[(PersistentVolume<br/>uploads)]
    end

Paste this into any tool that renders Mermaid, or into the editor to change the theme and export PNG or SVG. Syntax reference: Flowchart guide.

What this diagram shows

Follow the request from Client to the Ingress, into the Namespace: shop subgraph, through the Service to one of three pods inside the Deployment subgraph. Dotted edges from ConfigMap and Secret show configuration mounted into the pods, and the cylinder PersistentVolume holds uploaded files. Only Pod api-1 is wired to the mounts to keep the picture readable; the other two are identical.

Nested subgraphs are what make this a flowchart job. They map directly onto the namespace and deployment boundaries that Kubernetes itself uses.

How to adapt it

  • Rename Namespace: shop and Deployment: api to your real namespace and workload names.
  • Add a second deployment subgraph, for example a worker, and connect it to a Queue node instead of the service.
  • Replace Service<br/>ClusterIP :80 with Service<br/>LoadBalancer if you expose the workload without an ingress.
  • Add a HPA[HorizontalPodAutoscaler] node with a dotted edge into the deployment subgraph to show autoscaling.
  • Draw the Secret and ConfigMap edges to all three pods if you want to stress that every replica gets the same configuration.

FAQ

Why are the subgraph titles in quotes?

Because they contain a colon and parentheses. Mermaid treats unquoted colons and brackets as syntax; wrapping the title in double quotes after the id, as in subgraph NS["Namespace: shop"], avoids a parse error.

What do the dotted arrows mean?

The -.-> edge is a dotted link. Here it marks configuration that is mounted into the pod rather than request traffic, so readers can separate the data path from the configuration path.

Can I show which node each pod runs on?

Yes. Add a subgraph per node, for example subgraph N1[Node 1], and move the pod nodes inside. Keep the deployment subgraph if you still want to show the replica count, but nesting three levels gets crowded fast.