Architecture
The Kubernetes deployment has two layers:- Controller — a Go-based Kubernetes controller that reconciles Gateway API and agentgateway CRDs, then pushes configuration to data plane instances via xDS.
- Data plane (proxy) — the agentgateway Rust binary, deployed as a managed
DeploymentperGatewayresource.
Installation
Agentgateway is distributed as two Helm charts:| Chart | Description |
|---|---|
agentgateway-crds | Installs the Custom Resource Definitions (CRDs) |
agentgateway | Installs the controller and related RBAC resources |
Check the Kubernetes documentation for the latest install commands and chart versions as the registry may change between releases.
Gateway API integration
Agentgateway registers aGatewayClass named agentgateway. Create a Gateway referencing this class to provision a data plane instance:
Gateway resource, the controller provisions a Deployment and Service for the agentgateway proxy in the same namespace.
Custom Resources
Agentgateway defines three CRDs under theagentgateway.dev API group:
AgentgatewayParameters (agpar)
AgentgatewayParameters (agpar)
AgentgatewayParameters customizes how the controller provisions the data plane. Attach it to a GatewayClass via parametersRef to apply settings to all gateways using that class, or target individual gateways.| Field | Description |
|---|---|
logging.level | Log level in RUST_LOG syntax |
logging.format | json or text |
image | Override the data plane container image |
rawConfig | Opaque agentgateway config merged with typed fields |
env | Additional environment variables for the proxy container |
resources | CPU/memory resource requests and limits |
shutdown.min / shutdown.max | Graceful shutdown delay range in seconds |
AgentgatewayPolicy (agpol)
AgentgatewayPolicy (agpol)
AgentgatewayPolicy attaches traffic, frontend, or backend policies to Gateway API resources.| Section | Targets | Purpose |
|---|---|---|
frontend | Gateway | Incoming TLS, HTTP settings, access logging, tracing |
traffic | Gateway, ListenerSet, HTTPRoute, GRPCRoute | Rate limiting, CORS, auth, retries, timeouts |
backend | Any of the above, plus Service / AgentgatewayBackend | TLS to upstream, connection settings, mTLS |
AgentgatewayBackend
AgentgatewayBackend
AgentgatewayBackend defines a static backend (e.g. an MCP server reachable via HTTP) that can be referenced from HTTPRoute rules.Use this when your MCP or AI backend is not a Kubernetes Service — for example, an external API or a stdio-based process.Helm chart configuration
Theagentgateway chart exposes values for tuning the controller and proxy:
Enabling xDS TLS
To encrypt communication between the controller and proxy on the xDS gRPC channel:agentgateway-xds-cert in the installation namespace:
tls.crt, tls.key, and ca.crt data fields.
Namespace isolation and multi-tenancy
By default, the controller discovers Gateway API resources across all namespaces. UsediscoveryNamespaceSelectors to restrict discovery to specific namespaces:
agentgateway.dev/managed: "true", enabling multi-tenant deployments where different teams control their own namespaces.
Istio integration
Agentgateway can connect natively to Istio-enabled pods using mTLS. Enable Istio integration inAgentgatewayParameters:
GatewayClass parameters
To attachAgentgatewayParameters to a GatewayClass, configure gatewayClassParametersRefs in the Helm values:
AgentgatewayParameters for all Gateway resources using the agentgateway GatewayClass.
Scaling and resilience
Horizontal Pod Autoscaler
Configure HPA on the controller via
controller.horizontalPodAutoscaler. The controller manages the HPA scaleTargetRef automatically.Pod Disruption Budget
Configure PDB on the controller via
controller.podDisruptionBudget to ensure availability during voluntary disruptions.Resource limits
Set CPU and memory requests and limits via
resources in the Helm values or AgentgatewayParameters.spec.resources.Graceful shutdown
Configure
AgentgatewayParameters.spec.shutdown.min and .max to control the drain window for rolling updates.