Kubernetes · Kubernetes Ingress · Diagram as code

Kubernetes Ingress architecture diagram

Show how an Ingress routes to a Service that targets a Deployment, optionally with a HorizontalPodAutoscaler. ArchLex checks cluster/namespace containment and relationship endpoints.

Ingress to Service to Deployment.

The standard north-south path inside one namespace.

Kubernetes Ingress architecture diagram: Ingress routes to a Service that targets a DeploymentKubernetes Ingress architecture diagram: Ingress routes to a Service that targets a Deployment
provider k8s
direction LR

cluster production {
  namespace app {
    edge: ingress["Public ingress"]
    svc: service["API service"]
    deploy: deployment["API pods"]

    edge -[routes]-> svc
    svc -[targets]-> deploy
  }
}

Open this diagram in the playground

Ingress with autoscaled Deployment.

Add a HorizontalPodAutoscaler that scales the same Deployment.

Kubernetes Ingress architecture diagram: Ingress to Service to Deployment scaled by HPAKubernetes Ingress architecture diagram: Ingress to Service to Deployment scaled by HPA
provider k8s
direction LR
validation normal

cluster production {
  namespace api {
    edge: ingress["api.example.com"]
    svc: service["API"]
    deploy: deployment["API pods"]
    hpa: horizontalpodautoscaler["Autoscaler"]

    edge -[routes]-> svc
    svc -[targets]-> deploy
    hpa -[scales]-> deploy
  }
}

Open this diagram in the playground

Pattern notes for Kubernetes Ingress.

Placement and relationship rules ArchLex enforces for this service.

Ask an agent to draw it.

Install the ArchLex skill or connect the free MCP server, then paste this prompt.

Agent skill install
npx skills add baires/archlex
Draw a Kubernetes Ingress architecture diagram with an Ingress routing to a Service that targets a Deployment, plus a HorizontalPodAutoscaler. Validate containment and give me a playground link.

Prefer MCP? Follow the MCP server guide.

Related Kubernetes examples.

Browse all examples

Kubernetes Ingress diagram questions.

How do I diagram Kubernetes Ingress with ArchLex?

Nest ingress, service and deployment inside cluster → namespace scopes. Connect with ingress -[routes]-> service and service -[targets]-> deployment.

Can I include a HorizontalPodAutoscaler?

Yes. horizontalpodautoscaler -[scales]-> deployment is a declared edge. Keep the HPA in the same namespace as the workload.

Does ArchLex read my cluster or manifests?

No. It validates the diagram source. Selectors, TLS secrets and ingress class configuration are not inferred.

Where is the Kubernetes reference?

See the https://docs.archlex.dev/specs/k8s-semantics/ for scopes, resources and relationship rules.

More Kubernetes service diagrams.

Open source · MIT licensed

Diagram Kubernetes Ingress as code.