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.

Kubernetes architecture diagram: Ingress and Services routing to frontend and API Deployments inside a namespaceKubernetes architecture diagram: 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
  }
}

See this example in the gallery

Why write Kubernetes diagrams as code?

More Kubernetes architecture examples.

Each example passes ArchLex provider checks and opens in the playground. Browse all examples.

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.

Agent skill install
npx skills add baires/archlex

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

Kubernetes 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

Diagram your Kubernetes architecture.