Skip to main content

How a stack fits together

The whole system
One application, everything around it, and the links in between

A stack is your application plus every service it needs. Each connection between two parts is a typed link, and each link generates configuration on both sides of it. This page is the map: the layers, the links that join them, and what each one produces.

WHO REACHES ITgateway routeapisix-<app>login<app>-clientweb firewallwaf-<app>private accessvpn-apisixWHAT IT NEEDSdatabase<app>-dbevents<app>-topic · -queuevectors · search-collection · -opensearchcache · objects-valkey · -swbucketa model<app>-ai_gatewayYOUR APPLICATIONyour code, built in-clusterAROUND EVERYTHING, FROM THE SAME LINKSDELIVERYbuild · deployArgo CD · ReloaderOBSERVABILITYmetrics · logstraces · dashboardsSECURITYpolicy · detectionnetwork · admissionOPERATIONSagent · MCPtests · scans · evidenceevery edge is a typed link
One graph, read from the middle: the application, who reaches it, what it needs, and the delivery, observability, security and operations generated around all of it from the same links.

Read a stack from the middle​

Every stack has the same shape, whatever it does:

  1. The application sits in the middle. It is your own code, built inside the cluster, or an image you already have.
  2. Who reaches it is on one side: the gateway route, the login, the web application firewall, private access through a VPN.
  3. What it needs is on the other side: databases, event streams, vector stores, caches, object storage, search, models.
  4. Around everything sit delivery, observability, security and operations. You do not configure them per application. They are generated from the same links.

Nothing in this picture is configured twice. A link from your application to a database gives the application its connection variables, gives the database its user, opens the network path between the two namespaces, and registers the relationship with the stack agent, which then tests it.

The link type is always sourceType-targetType, and it is the contract: it decides which files appear and which values travel. The table lists the link types an application uses most, by layer. The full vocabulary is in Link types.

LayerComponentsLinks into this layerWhat the link generates
Your applicationExternal source code (your repository, built in the cluster) · Image base (an image you already have) · FastAPI (a scaffold)—The workload, its env Secret, the in-cluster build, the dev_tools/ kit — see Build and deploy
Relational and document dataCloudNativePG · MongoDB · MariaDB · Neo4j · ClickHouse<app>-db, <app>-mongo_db, <app>-maria_db, <app>-neo4j_db (each to a database sub-component)Connection variables in the shape your framework expects, the database and its user, the network path
EventsKafka (topics, bridges, node pools) · RabbitMQ (exchanges, queues) · Apicurio<app>-topic, <app>-exchange, <app>-apicurio_schema_registryKAFKA_BOOTSTRAP_SERVERS, KAFKA_TOPICS, the security protocol and the TLS file locations; the AMQP connection and RABBITMQ_QUEUES; SCHEMA_REGISTRY_URL
Search, vectors, cache, objectsOpenSearch · Qdrant (collections) · Valkey · SeaweedFS (buckets)<app>-opensearch, <app>-collection, <app>-valkey, <app>-swbucketOPENSEARCH_URL and its credentials, QDRANT_URL and QDRANT_COLLECTION, the cache connection (REDIS_URL for most frameworks), the S3 endpoint, bucket and access key
ModelsvLLM (one sub-component per model) · KServe · MLflow · Open WebUI · Langflow · Flowise<app>-ai_gateway to an AI gateway route, which links ai_gateway-model to a served modelAI_GATEWAY_URL, AI_GATEWAY_MODEL, AI_GATEWAY_API_KEY and its header name; the gateway applies the key, the prompt guard and the token budget
IdentityKeycloak (clients, realms, external identity providers)<app>-client or client-<app>OIDC_ISSUER_URL, OIDC_DISCOVERY_URL, OIDC_REALM, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_REDIRECT_URIS; the client itself; the login at the gateway when the route asks for it — see Identity and secrets
Gateway and accessAPISIX (routes, AI gateway) · cert-manager · VPN · CrowdSec WAF profilesapisix-<app>, vpn-apisix, waf-<app>, apisix-crowdsecA route on <subdomain>.<domain> with TLS, rate limit, CORS, IP allow-list and login; VPN-only access; a WAF in front — see Gateway, login and private access
DeliveryIn-cluster builds · Argo CD · Reloaderargo_cd-<type>One Argo CD Application per linked component, Jobs as sync hooks, restart on a changed Secret — see Build and deploy
ObservabilityPrometheus · Grafana · Loki · Alloy · OpenTelemetryprometheus-<type>, grafana-prometheus, grafana-loki, alloy-loki, <app>-otelScrape configuration, alert rules and dashboards for the linked component; log shipping; trace export
ScaleKEDA · Kueue · k6keda-prometheus, prometheus_query-<app>, keda-db, keda-topic, keda-queue, keda-modelAutoscalers bound to real signals; load-test suites whose results land in Prometheus — see Lifecycle and scale
SecurityGenerated network policies · OPA · Falco · Suricata · CrowdSec · OpenBao · External Secrets · Trivy · SonarQube · Nuclei · Sigstore<source>-opensearch, crowdsec-suricata, sonarqube-<app>, nuclei-<app>, external_secrets-openbaoPolicies per link, admission constraints, detection feeds, build gates, scans — see Security, layer by layer
OperationsStack agent · MCP server · Velerofastmcp-stack_agent, fastmcp-<type>, stack_agent-swbucketLink tests, scans, evidence, backups; the AI tools for each linked technology — see Day 2 and MCP

<app> stands for the application's component type: external_source_code, image_base or fastapi. The variable names above are the ones an external_source_code component receives. For a database, a cache, a bucket, a message broker and MongoDB the names follow the component's framework_type: a Python application gets DATABASE_URL, REDIS_URL, S3_ENDPOINT_URL, AMQP_URL and MONGODB_URI; a Spring application gets the SPRING_* properties; Node.js, Rails, Laravel and the generic set each get their own conventional names.

Take the most common link, an application to a PostgreSQL database (external_source_code-db, drawn to a database sub-component of a CloudNativePG cluster).

WhereWhat appears
The applicationConnection variables in its env Secret, named for its framework
The databaseThe database and its owner, from the sub-component's attributes
The networkA policy that lets the application's namespace reach the database namespace on the database port
DeliveryWhen Argo CD manages the database, the grant Job runs as a sync hook
MonitoringWith a prometheus-cnpg link, the cluster's metrics, alert rules and dashboards
BackupsWith a cnpg-swbucket link, the object store and the backup schedule, as link attributes
The stack agentThe link appears in link validation: is it rendered, did the credential arrive, is the port reachable, does the database answer with that credential

Removing the link removes all of it from the repository at the next build. Objects already in the cluster stay until someone deletes them, because an apply never removes what a file no longer lists — see Build and deploy.

Two real stacks, end to end​

The two pages that follow walk through stacks the Stacktic team runs, cell by cell. Names are the ones on their diagrams; hosts and credentials are left out.

Read any stack yourself​

Every stack repository describes itself. These files are generated on every build:

FileWhat it tells you
stack-metadata.yamlThe graph as data: every component, sub-component, link and attribute. The stack agent and the MCP read this file
README.mdThe architecture, rendered as a diagram
network-diagram.mdEvery network path the links opened, and why
networkpolicy-manifest.jsonThe generated policies, and any link the generator could not resolve
doc/One page per component, with what its links generated
audit/A security audit of the design

An AI client connected to the stack's MCP server reads the same graph with stack_graph, and can explain any link with knowledge(action='link', link_type=<type>).

Where to go next​