# How to prompt archhy: 10 Kubernetes diagram examples

> Write clearer architecture briefs in archhy, then try ten original Kubernetes prompts covering traffic, scaling, GitOps, storage and multi-cluster views.

## Key takeaways

- Name the audience, scope, boundaries and direction of each important relationship.
- Separate application traffic from configuration, reconciliation and scaling.
- Use one focused view first, then ask for a small, explicit change.
- Inspect the generated diagram before sharing it; a plausible picture does not prove an architecture works.

A useful Kubernetes diagram starts with a brief that explains what the reader needs to understand. These Kubernetes diagram prompts show how to ask archhy for boundaries, workloads and meaningful arrows, then refine the result. They cover ten different conversations, from a public request to a multi-cluster overview.

Each numbered example links to its own article with an editable Archhy diagram, a picture, an explanation and a refinement exercise. These are original starting briefs, not deployment manifests or guaranteed AI outputs. Replace the names and assumptions with your own. For a worked application walkthrough, see [WordPress on Kubernetes](https://archhy.com/blog/wordpress-on-kubernetes-architecture).

## Write a brief archhy can draw

Start with the question: “How does a request reach the application?” or “What changes when the queue grows?” Then specify the objects, their containers, and the relationships between them. Name what is outside the cluster. Finish with layout instructions and what to leave out.

> Create a diagram for [audience] explaining [question]. Group [objects] inside [cluster and namespaces]. Keep [external systems] outside. Draw [source] to [destination], labelled [operation]. Use solid arrows for traffic and dashed, labelled arrows for management relationships. Arrange left to right. Omit [out-of-scope detail].

An arrow should answer a verb: calls, publishes, mounts, reconciles or scales. A Deployment manages pods; traffic does not pass through the Deployment object. A namespace box groups resources; it does not enforce network isolation by itself. Ask for a small legend when line styles carry meaning.

## Generate, inspect, then edit

On a computer, open **AI → Generate with AI**. Choose an available model and use **Cloud: Auto** for a provider-neutral brief. Press **Generate**, inspect the returned JSON, then **Save** to apply it. On a phone, open **AI → Generate**; the result is applied to the canvas, with **Undo** and **Done**. Generation replaces the current diagram, so keep a copy of work you need.

AI requires your configured provider key or available AI credits. For refinements, use **Edit with AI** and leave **Preserve layout** on. Say what stays and request one change. archhy has Kubernetes icons; see the [icon-pack guide](https://archhy.com/blog/azure-google-cloud-kubernetes-icons-for-everyone) when choosing or correcting a symbol.

## 1. [Trace a public web request](https://archhy.com/blog/kubernetes-gateway-api-web-app-diagram)

> Draw a customer portal in one Kubernetes cluster. Put a Gateway API controller and its proxy in namespace edge, and a ClusterIP Service with three web pods in portal. Show internet → external cloud load balancer → proxy → Service → pods → managed PostgreSQL through a private endpoint outside the cluster. Add Gateway and HTTPRoute as configuration relationships, plus a Deployment, ConfigMap, Secret and HPA targeting 65% CPU. Keep management arrows separate from traffic.

**Check:** HTTPRoute and HPA must not become request hops. CPU-based HPA needs CPU requests and resource metrics. This example uses Gateway API: community ingress-nginx retired in March 2026; that retirement does not cover every NGINX product. See the [Gateway API model](https://gateway-api.sigs.k8s.io/docs/concepts/api-overview/), [HPA documentation](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/) and [retirement notice](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/).

## 2. [Explain namespace isolation](https://archhy.com/blog/kubernetes-network-policy-diagram)

> Diagram a booking application with frontend, reservations and data namespaces. Show browser traffic reaching frontend, frontend calling the reservations Service, and reservations querying the database. Annotate default-deny ingress and egress policies, explicit application allowances and DNS egress. Assume a NetworkPolicy-capable network plugin. Draw policy callouts beside the affected workloads, not as proxy boxes in the traffic path.

**Refine:** “Keep all nodes. Label the permitted connections with ports from our specification; mark unknown ports as unspecified.” Verify the allowances against real [NetworkPolicies](https://kubernetes.io/docs/concepts/services-networking/network-policies/).

## 3. [Make queue-driven scaling understandable](https://archhy.com/blog/kubernetes-keda-queue-workers-diagram)

> Show an image-processing worker Deployment in namespace media consuming jobs from an external queue and writing results to object storage. Add KEDA, a ScaledObject and the generated HPA as labelled management relationships. Show zero workers when idle and a maximum of twelve. Include a dead-letter queue for exhausted retries. Use separate arrows for consuming jobs, storing results and reading queue metrics.

**Check:** KEDA is not a job relay. Its activation and HPA scaling have different roles; use the [KEDA scaling model](https://keda.sh/docs/latest/concepts/scaling-deployments/) to review the arrows. Ask for idempotency as a note beside workers.

## 4. [Show stable identity and storage](https://archhy.com/blog/kubernetes-statefulset-storage-diagram)

> 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.

**Refine:** “Keep the structure. Put storage below each pod and discovery above.” Compare identities and volumes with the [StatefulSet model](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/).

## 5. [Explain a scheduled export](https://archhy.com/blog/kubernetes-cronjob-export-diagram)

> Create an operations view of a nightly reporting export. In namespace reporting, a CronJob creates a Job which runs an export pod. The pod reads a managed database outside Kubernetes and writes an encrypted archive to external object storage. Show a ServiceAccount and its permission relationship separately. Add notes for retry-safe execution, retention and failure notification; leave their unspecified implementations as notes.

**Check:** A schedule is not a guarantee of exactly one execution. [CronJob guidance](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) calls for idempotent jobs. Do not label this a database replication mechanism.

## 6. [Separate GitOps from application traffic](https://archhy.com/blog/kubernetes-argocd-gitops-diagram)

> Draw a GitOps delivery view for staging and production namespaces. A CI pipeline tests code, builds an image and pushes it to an external registry, then updates a configuration repository. Argo CD in platform reconciles the repository into the cluster API. Represent image pulls by worker-node kubelets. Show application traffic in a separate lane. Label production promotion as a reviewed repository change.

**Refine:** “Keep every component. Remove any arrow implying Argo CD carries customer requests.” For a later multi-cluster view, [ApplicationSet cluster targeting](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/) is a useful reference.

## 7. [Follow telemetry to its destination](https://archhy.com/blog/kubernetes-opentelemetry-collector-diagram)

> Diagram observability for an API namespace. Application pods send traces to OpenTelemetry Collector agents running as a DaemonSet; agents forward telemetry to a Collector gateway Deployment in observability, then to an external backend. Label traces, metrics and logs only where each is actually collected. Include a legend and an explicit note that application requests do not pass through the collectors.

**Check:** Decide which signals your collector configuration supports. The [Collector deployment guide](https://opentelemetry.io/docs/platforms/kubernetes/collector/) describes different patterns. Do not substitute this pipeline for HPA resource metrics without an explicit integration.

## 8. [Trace secret delivery without revealing secrets](https://archhy.com/blog/kubernetes-external-secrets-diagram)

> Show an application in namespace billing using External Secrets Operator. Put the operator in platform and an ExternalSecret resource plus Kubernetes Secret in billing. Show the operator retrieving a value from an external secret store and reconciling the Kubernetes Secret. The application mounts that Secret. Use symbolic names only. Draw authentication to the secret store as an implementation-specific relationship requiring confirmation.

**Check:** The application need not call the external store directly in this pattern. Review the [operator workflow](https://external-secrets.io/latest/introduction/overview/). Never put real credentials in the prompt or diagram.

## 9. [Keep a multi-cluster overview readable](https://archhy.com/blog/kubernetes-multi-cluster-overview-diagram)

> Create an overview of two independent clusters, europe and americas. An external global traffic service uses health and latency to select a regional endpoint. Each cluster contains one representative application group. Show Argo CD in a separate management boundary reconciling both APIs. Draw asynchronous application-level state replication between regional data services. Mark conflict handling and failover policy as unresolved. Omit individual pods and intra-cluster networking.

**Refine:** “Create a separate detailed view of europe next.” Add a service mesh only when you can name its deployment and network model; [Istio documents multiple models](https://istio.io/latest/docs/ops/deployment/deployment-models/). A mesh arrow does not establish database consistency.

## 10. [Explain Knative cold starts](https://archhy.com/blog/kubernetes-knative-cold-start-diagram)

> Draw a Knative Serving request view for a document-preview function. Separate application resources from platform components in knative-serving. Show the Knative Service, Revision and workload relationship. Distinguish the warm request path from the cold-start path through Activator. Show autoscaler metrics and scaling as management arrows. Annotate zero application replicas when idle and reduced idle workload consumption, without claiming that the cluster itself costs nothing.

**Check:** Activator is not necessarily on every warm request path; review [Serving architecture](https://knative.dev/docs/serving/architecture/). As a separate follow-up, request Kafka Broker and Trigger event delivery to the function, stating that Kafka and the Eventing implementation must be installed. See the [Kafka Broker documentation](https://knative.dev/docs/eventing/brokers/broker-types/kafka-broker/).

## Before you share the result

Trace one request or event with your finger. Check every arrowhead, cluster boundary, namespace and external dependency. Confirm that management components sit outside the traffic path. Read labels at the exported size. If a relationship is ambiguous, change its label or remove it until you can explain it.

A useful final edit is: “Keep all existing nodes and positions. Label each existing rail with its actual operation. Do not invent missing connections; list assumptions as a small note.” Inspect that result too. Save the native diagram for later edits and export the view your audience needs.

## Frequently asked questions

### Can I paste these Kubernetes prompts into archhy?

Yes. Replace the example names and assumptions, use Generate with AI for a new diagram, then inspect and refine the result. The prompts are starting briefs, not tested deployment specifications.

### How do I improve a diagram without generating it again?

Use Edit with AI, keep Preserve layout on, name the objects to change and say what must stay. Ask for one change and inspect it before continuing.

### Should every Kubernetes object appear in the diagram?

No. Include objects needed to answer the reader's question. Split traffic, delivery and operations into separate views when their relationships become hard to follow.

### Does a generated diagram validate my cluster?

No. Check it against your manifests, controller configuration and actual network behaviour before relying on it.
