Get started with agentgateway in Kubernetes
Use the kgateway control plane to deploy and manage the lifecycle of agentgateway proxies on Kubernetes.
Agentgateway is an open source, AI-first data plane that provides connectivity for agents, MCP tools, LLMs, and inferences in any environment. In Kubernetes environments, you can use kgateway as the control plane to quickly spin up and manage the lifecycle of agentgateway proxies. The control plane translates Kubernetes Gateway API and agentgateway’s Kubernetes custom resources such as AgentgatewayPolicy and AgentgatewayBackend into proxy configuration for the data plane.Before you begin
These quickstart steps assume that you have a Kubernetes cluster, kubectl, and helm already set up. For quick testing, you can use Kind.
kind create clusterInstall
The following steps get you started with a basic installation.
-
Deploy the Kubernetes Gateway API CRDs.
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yamlkubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/experimental-install.yaml -
Deploy the CRDs for the kgateway control plane and agentgateway data plane by using Helm.
helm upgrade -i --create-namespace --namespace kgateway-system --version v2.2.0-main \ kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds \ --set controller.image.pullPolicy=Always -
Install the kgateway control plane by using Helm. Make sure to enable the agentgateway feature flag,
--set agentgateway.enabled=true. To use experimental Gateway API features, include the experimental feature gate,--set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true.helm upgrade -i --namespace kgateway-system --version v2.2.0-main kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \ --set agentgateway.enabled=true \ --set controller.image.pullPolicy=Always \ --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true -
Make sure that the
kgatewaycontrol plane is running.kubectl get pods -n kgateway-systemExample output:
NAME READY STATUS RESTARTS AGE kgateway-5495d98459-46dpk 1/1 Running 0 19s
Good job! You now have the kgateway control plane running in your cluster.
Next steps
Create an agentgateway proxy that you can use for Model Context Protocol (MCP), agent-to-agent (A2A), large language model (LLM), and more AI-related use cases. For example, you can follow the guide to use agentgateway to proxy traffic to a sample MCP tool server. The example deploys a sample MCP server with a fetch tool, exposes the tool with agentgateway, and tests the tool with the MCP Inspector UI.
For other examples, see the LLM consumption, inference routing, MCP, or agent connectivity guides.
Cleanup
No longer need kgateway? Uninstall with the following command:
helm uninstall kgateway -n kgateway-system