LangGuard on a Kubernetes cluster
You can install LangGuard with Helm into a Kubernetes cluster. LangGuard keeps its data in a PostgreSQL server. The cluster, the database and the network are yours, and you operate them.
You prepare the cluster and the database with your own tools. The Requirements page tells you what each one must provide. The Helm chart then installs LangGuard into the cluster.
This section applies to all Kubernetes clusters. For an AKS cluster with Azure Database for PostgreSQL and Azure OpenAI, the Azure section gives the Azure-specific requirements, commands and values.
This deployment serves one organization: one application, one database and one set of users. It does not install the multi-tenant provisioning service.
The installer bundle
LangGuard delivers the deployment as one archive, langguard-install.zip:
langguard-install/
├── README.md
├── images/ LangGuard container images and manifest.env
├── charts/
│ ├── langguard/ the LangGuard Helm chart; README.md lists all values
│ └── langguard-postgresql/ single-pod PostgreSQL, for pilots only
├── push-images.sh pushes the images to your registry
├── gcp/ Google Cloud installer
├── helm/
│ └── INSTALL.md installation guide for any Kubernetes cluster
└── azure/
└── INSTALL.md Azure (AKS) specifics, used with helm/INSTALL.md
images/ holds the four LangGuard application images: langguard-dashboard,
otel-ingest, langguard-discovery and langguard-ai-gateway (the AI gateway).
push-images.sh pushes them to your container registry. You do not need a registry
credential from LangGuard. The AI gateway image is about 0.5 GB compressed for each
architecture, so it adds about 1 GB to the bundle.
Architecture
Your users Your agents (OTLP, AI gateway)
│ HTTPS 443 │ HTTPS 443
▼ ▼
┌──────────────────────────────────────────────────────────────────────────┐
│ Load balancer of your Gateway or Ingress controller: public or private │
└───────────────────────────────────┬──────────────────────────────────────┘
│
┌───────────────────────────────────┴──────────────────────────────────────┐
│ Your Kubernetes cluster · namespace langguard (Helm release langguard) │
│ │
│ Gateway (Gateway API) or Ingress — TLS termination │
│ /v1/traces, /v1/logs, /v1/metrics, OTLP gRPC services → otel-ingest │
│ /aigateway/ → langguard-dashboard (front proxy) → litellm │
│ all other paths → langguard-dashboard │
│ │
│ langguard-dashboard otel-ingest opencite (langguard-discovery) │
│ opa presidio-analyzer redis │
│ litellm (AI gateway, on by default) │
│ Helm hook Jobs: db-bootstrap → db-migration → db-grants │
│ → ai-gateway-migration (with the AI gateway) │
└──────┬─────────────────────┬────────────────────┬────────────────────────┘
│ TLS 5432 │ HTTPS, other ports │ image pull
▼ ▼ ▼
PostgreSQL 16 AI provider Your container
or later (optional); registry
model providers and
MCP servers (AI gateway)
How the parts connect
- Ingress. The chart uses the Gateway API or an Ingress controller. You install the
Gateway API implementation or the Ingress controller. The chart does not install them.
- With the Gateway API, the chart creates the Gateway
langguardfor your GatewayClass, or it attaches its routes to a Gateway that you operate. The Gateway terminates TLS on port 443. A second route redirects HTTP to HTTPS. The routes send/v1/traces,/v1/logs,/v1/metricsand the OTLP/gRPC services tootel-ingest, and all other paths, other/v1/paths included, tolangguard-dashboard. - With an Ingress controller, the chart creates the Ingress
langguard. It sends/v1/traces,/v1/logsand/v1/metricstootel-ingest, and all other paths tolangguard-dashboard. For OTLP/gRPC, you add a second Ingress (see Ingress controller). - The certificate comes from cert-manager (Let's Encrypt or your own issuer), or you supply it. TLS ends at the Gateway or at the Ingress controller: from there to the pods, the traffic is plain HTTP inside the cluster.
- With the Gateway API, the chart creates the Gateway
- Telemetry.
otel-ingestreceives OpenTelemetry traces and logs over OTLP/HTTP and OTLP/gRPC, both on port 443. It does not ingest metrics: it answers/v1/metricswith HTTP 404. It stores the traces in PostgreSQL, queues them inredis, and forwards a copy toopencite.openciteruns thelangguard-discoverycatalog, which discovers agents, tools, models and MCP servers. The catalog also discovers the resources of the Azure AI Foundry integration. On AKS, it can sign in to Azure with its own managed identity (see Discovery identity). - Queue.
rediskeeps the work queues and the job schedules. It has no persistent volume. When theredispod is replaced (deleted, evicted, rescheduled or rolled out), the queued work and the job schedules are lost. After a container restart in the same pod,redisloads its last snapshot.langguard-dashboardandotel-ingestwait forrediswhen they start. The dashboard connects again after a restart ofredisand creates its job schedules again. - Policy and PII.
langguard-dashboardevaluates policies withopaand detects PII withpresidio-analyzer. - Database. Before each install and upgrade, Helm hook Jobs prepare the database as an
admin role that you supply. All database clients connect with TLS and verify the server
certificate. The workloads use the database role
langguard_app. It can read and write the application tables but cannot change their schema. It owns the schemadiscovery, which the catalog migrates. With the AI gateway, the rolelitellm_appowns the schemalitellm, which the Jobai-gateway-migrationmigrates. Each of the two roles has no rights in the schemas of the other. - AI gateway.
litellmis the LangGuard AI gateway: LiteLLM with the LangGuard guardrails and trace callback (imagelangguard-ai-gateway). The chart installs it by default (aiGateway.enabled). Your agents and applications send their LLM and MCP requests tohttps://<domain>/aigateway. The route sends/aigateway/tolangguard-dashboard, and its front proxy forwards the requests tolitellm. There is no route tolitellmfrom outside the cluster. The dashboard evaluates the policies for the gateway traffic, andlitellmsends its spans tootel-ingest.litellmkeeps the models, the MCP servers and their credentials in the schemalitellm. It connects to the model providers and the MCP servers that you add. The dashboard continues to operate when the gateway is not available. See AI gateway. - AI. The chart supports two values for
ai.provider:none(the default) andazure. Withnone, the chart configures no model. The AI features of LangGuard then fail, and the other features work without them. Withazure,langguard-dashboardcalls Azure OpenAI with keyless Microsoft Entra authentication through Azure workload identity. Azure workload identity needs an OIDC issuer URL of the cluster that Microsoft Entra ID can reach from the internet, and the Azure Workload Identity webhook. The chart sets only the ServiceAccount annotations and the pod label that the webhook reads. AKS supplies both (--enable-oidc-issuer --enable-workload-identity). On another cluster, install the webhook, and use the OIDC issuer URL of your cluster for the federated credential. For AWS Bedrock or an OpenAI-compatible endpoint, set the environment of the dashboard withdashboard.extraEnv. See AI features. For Azure OpenAI, see Azure OpenAI. The AI provider powers LangGuard's own AI features, for example Ask LangGuard, policy authoring and custom checks. It does not carry the model traffic of your agents: that traffic goes through the AI gateway. - Images. The nodes pull the LangGuard images from your container registry. OPA,
Redis, the Presidio analyzer and PostgreSQL (for the Jobs) are public upstream images.
The cert-manager images come from
quay.io. Your Gateway API implementation or Ingress controller uses its own images. - Availability.
langguard-dashboard(2 to 6 pods),otel-ingest(2 pods) andlitellm(2 pods) run more than one pod.opa,presidio-analyzer,redisandopenciterun one pod each. When the node of one of these pods is drained, for example for a node image upgrade, that workload stops until its pod starts on another node.
What the chart installs
The chart installs these items in the namespace langguard:
- The workloads
langguard-dashboard,otel-ingest,opencite(the catalog),opa,redisandpresidio-analyzer - The AI gateway
litellm, on by default. To install LangGuard without it, setaiGateway.enabled: false(see AI gateway). - The Helm hook Jobs that prepare the database:
db-bootstrap,db-migration,db-grantsand, with the AI gateway,ai-gateway-migration - The generated Secrets, for example the encryption key and, with the AI gateway, the
gateway keys in the Secret
ai-gateway-credentials - The NetworkPolicies of the workloads
- As options: the Gateway and its HTTPRoutes or the Ingress, and the cert-manager Certificate and ClusterIssuer
The chart README (charts/langguard/README.md) lists all objects.
What the chart does not install
The chart does not install these items. You supply them:
- The namespace
- PostgreSQL. For a pilot, the bundle has the chart
langguard-postgresql(see PostgreSQL). - cert-manager
- The Gateway API CRDs, a GatewayClass or an Ingress controller
- metrics-server
- DNS records
- Cloud resources, for example an identity, a load balancer IP address, an AI account or a container registry
- The accounts and API keys of your model providers for the AI gateway. You bring your own provider keys (BYOK).
- An MCP sandbox. The AI gateway supports remote (HTTP) MCP servers only. It does not support stdio MCP servers.
Next steps
- Requirements: what the cluster, registry, database and network must provide
- Installation: install the chart
- Sign-in and Email: configure the admin password sign-in and outbound email
- Azure: the Azure-specific requirements, commands and values for AKS