Skip to main content
Give the gateway its own hostname, separate from the app. LLM clients and coding agents send requests to the gateway hostname; browsers use the app hostname. This guide covers the nginx ingress the chart renders, a cloud load balancer in front of the Service, and the checks that prove the endpoint works.

Prerequisites

  • A DNS zone you control, for example acme.com.
  • An ingress controller, or the AWS Load Balancer Controller for the NLB option below.
  • cert-manager with a ClusterIssuer, or a certificate you provide yourself.
1

Set the ingress values

The chart renders one Ingress from these values:
Replace host. The chart placeholder gateway.langwatch.ai is skipped when the control plane derives the public URL, so an install that keeps it hands CLI users no gateway URL.The four nginx.ingress.kubernetes.io/proxy-* annotations keep streamed responses unbuffered and let a stream run for an hour. Keep them.
2

Issue the certificate

With the cert-manager.io/cluster-issuer annotation, cert-manager requests a certificate for ingress.host and stores it in ingress.tls.secretName. A DNS-01 issuer works before the DNS record exists:
To bring your own certificate, create the TLS Secret yourself and drop the cert-manager.io/cluster-issuer annotation:
3

Create the DNS record

Point a CNAME at the ingress controller’s load balancer hostname:
Use a CNAME, never an A record: cloud load balancer addresses change.
4

Verify

The /health call returns {"status":"ok","checks":{"gateway":"ok","control_plane":"ok"}}. The /v1/models call returns 200 with the models your key can route to. Continue with the post-install checklist.

What the ingress publishes

/healthz, /readyz, /startupz, /metrics, /debug/control-plane and /internal/* stay in-cluster. The Gemini-native routes under /v1beta are outside the /v1 prefix and are not published by the default ingress; ingress.path: / publishes every route, including the probes and /metrics.

Cloud load balancer in front of the Service

To terminate TLS on a cloud load balancer instead of the ingress, disable the ingress and turn the Service into a LoadBalancer. On AWS with the Load Balancer Controller and an ACM certificate:
Both examples terminate TLS in front of the gateway and reach port 5563 over plain HTTP, so the Authorization header that carries the virtual key crosses that last hop without encryption. The ingress terminates at the ingress controller and the network load balancer terminates at the load balancer, which puts the plaintext hop inside the cluster network in the first case and between the load balancer and the pods in the second. Both assume that network is trusted. Where it is not, run a service mesh with mutual TLS between the terminator and the gateway pods.
Request the certificate first and publish the validation CNAME records ACM prints:
Then read the load balancer hostname and point the CNAME at it:
A Service of type LoadBalancer publishes every route, including /metrics, the probes and /debug/control-plane, which returns the resolved LW_GATEWAY_BASE_URL and takes no key. Put a load balancer listener rule or a security group in front of it when the address is public. Set service.internal.enabled: true to also render a ClusterIP Service named langwatch-gateway-internal for in-cluster callers, so they do not go out through the load balancer.

Other ingress controllers

Set ingress.className and replace the nginx annotations with the controller’s equivalents. Two settings matter for every controller: response buffering off, and an idle or read timeout above the longest stream you allow. The gateway lets a provider call run up to 14 minutes. AWS ALB example:

Outbound endpoint policy

TLS in front of the gateway is one boundary. The other is the provider endpoints that customers configure on their own credentials. Three variables, set through gateway.security.* in the chart, control them: Both switches default to false, so a self-hosted install can route to a model server on the cluster network. Cloud metadata addresses, 0.0.0.0, :: and link-local ranges are refused with every setting. Setting ENVIRONMENT to anything other than local requires both switches to be true.

Common failures

More symptoms are on Troubleshooting.
Last modified on September 6, 2026