Install agentgateway
Install the agentgateway control plane and get agentgateway running in your cluster. 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 agentgateway 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 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. For detailed instructions, see the installation guides.
-
Deploy the Kubernetes Gateway API CRDs.
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yamlCRDs in the experimental channel are required to use some experimental features in the Gateway API. Guides that require experimental CRDs note this requirement in their prerequisites.
kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/experimental-install.yaml -
Deploy the CRDs for the agentgateway control plane by using Helm.
helm upgrade -i agentgateway-crds oci://ghcr.io/kgateway-dev/charts/agentgateway-crds \ --create-namespace --namespace agentgateway-system \ --version v2.2.1 \ --set controller.image.pullPolicy=Always -
Install the agentgateway control plane by using Helm. To use experimental Gateway API features, include the experimental feature gate,
--set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true.helm upgrade -i agentgateway oci://ghcr.io/kgateway-dev/charts/agentgateway \ --namespace agentgateway-system \ --version v2.2.1 \ --set controller.image.pullPolicy=Always \ --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true -
Make sure that the
agentgatewaycontrol plane is running.kubectl get pods -n agentgateway-systemExample output:
NAME READY STATUS RESTARTS AGE agentgateway-5495d98459-46dpk 1/1 Running 0 19s
Good job! You now have the agentgateway control plane running in your cluster.
Set up an agentgateway proxy
-
Create a Gateway that uses the
agentgatewayGatewayClass. The following example sets up a Gateway that uses the default agentgateway proxy template.kubectl apply -f- <<EOF apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: agentgateway-proxy namespace: agentgateway-system spec: gatewayClassName: agentgateway listeners: - protocol: HTTP port: 80 name: http allowedRoutes: namespaces: from: All EOF -
Verify that the agentgateway proxy is created.
- Gateway: Note that it might take a few minutes for an address to be assigned.
- Pod for
agentgateway-proxy: The pod has one container:agent-gateway.
kubectl get gateway agentgateway-proxy -n agentgateway-system kubectl get deployment agentgateway-proxy -n agentgateway-systemExample output:
NAME CLASS ADDRESS PROGRAMMED AGE agentgateway-proxy agentgateway a1cff4bd974a34d8b882b2fa01d357f0-119963959.us-east-2.elb.amazonaws.com True 6m9s NAME READY UP-TO-DATE AVAILABLE AGE agentgateway-proxy 1/1 1 1 6m11s -
Verify that the external IP has been created and is not
pending.kubectl get svc -n agentgateway-system agentgateway-proxyExample output:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE agentgateway-proxy LoadBalancer 172.20.200.127 <pending> 80:30752/TCP 7m6s -
Get the external address of the agentgateway proxy and save it in an environment variable.
export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}") echo $INGRESS_GW_ADDRESSkubectl port-forward deployment/agentgateway-proxy -n agentgateway-system 8080:80
Next steps
Choose a quick start to route traffic with agentgateway:
Cleanup
No longer need agentgateway? Uninstall with the following command:
helm uninstall agentgateway agentgateway-crds -n agentgateway-system