Kubernetes · Open source · No account required
Kubernetes architecture diagrams as code.
Describe clusters, namespaces, Deployments, Services, Ingresses and volumes in plain text. ArchLex checks them against 62 Kubernetes resources and renders SVG with the Kubernetes community icons.
Kubernetes Microservices.
Ingress and Services routing to frontend and API Deployments inside a namespace.
provider k8s
direction LR
validation normal
cluster production {
namespace web {
gateway: ingress
frontend_service: service
frontend: deployment
api_service: service
api: deployment
gateway -[routes]-> frontend_service
frontend_service -[targets]-> frontend
frontend -[invokes]-> api_service
api_service -[targets]-> api
}
}Why write Kubernetes diagrams as code?
- Clusters and namespaces are real scopes. Namespaces belong inside clusters and workloads belong inside namespaces. A workload or namespace in the wrong place reports a containment diagnostic.
- Kubernetes relationships. routes (Ingress to Service), targets (Service to workload), mounts, binds (PersistentVolumeClaim to PersistentVolume), scales (HorizontalPodAutoscaler to workload) and schedules-on (Pod to Node) are checked against declared endpoints.
- Common mistakes, caught. Rules flag bare Pods, Services without workloads, Ingresses without Service routing, unbound claims and RBAC bindings without a subject.
- Community icons. Resources render with the Kubernetes community icon set, pinned to a fixed commit and sanitized before rendering.
More Kubernetes architecture examples.
Each example passes ArchLex provider checks and opens in the playground. Browse all examples.
- Kubernetes Stateful ApplicationService exposing a StatefulSet backed by a PersistentVolumeClaim and PersistentVolume
- Kubernetes Scheduled Batch ProcessingCronJob loading runtime settings from a ConfigMap and credentials from a Secret
- Kubernetes Autoscaled Resilient APIService and Deployment protected by horizontal autoscaling and a disruption budget
- Kubernetes Namespace RBACRoleBinding granting a namespaced Role to an application ServiceAccount
Let your AI agent draw it.
Install the ArchLex skill or connect the MCP server, then ask Claude, Cursor, or Codex to diagram your Kubernetes setup. The agent writes the source, ArchLex validates it, and you get back an SVG.
npx skills add baires/archlexPrefer MCP? Follow the MCP server guide.
Render from the command line.
Save the source as a .arch file and render it with the CLI, or call @archlex/core from Node.js or the browser.
npx @archlex/cli render k8s-microservices.arch --output k8s-microservices.svgKubernetes diagram questions.
Which Kubernetes resources are supported?
62 resources across workloads, networking, configuration, storage, scaling, policy, RBAC, extensibility and control-plane components. Aliases such as deploy, svc and pvc work in the editor.
Does ArchLex read my cluster or manifests?
No. It validates the diagram source. Rules do not infer selectors, RBAC policy contents, storage provisioning, admission policy or cluster runtime state.
Can I show a cluster running on AWS or Google Cloud?
Yes. Use qualified kinds such as k8s.deployment with aws.* or gcp.* resources, or put Cloudflare Tunnel in front of a cluster. The gallery includes a Cloudflare Tunnel into GKE example.
Can an AI agent draw Kubernetes diagrams with ArchLex?
Yes. Install the agent skill with npx skills add baires/archlex, or connect the free hosted MCP server at https://mcp.archlex.dev/mcp. Claude Code, Cursor, Codex and other MCP clients can look up Kubernetes resources, validate the source, render SVG and return an editable playground link. No API key or account is required.
Kubernetes service architecture diagrams.
Focused pages for high-search services, each with validated ArchLex source and SVG.
Other clouds.
Mix providers in one diagram when your architecture does.
Open source · MIT licensed