Setup
Set up an agentgateway proxy.
Before you begin
-
Install kgateway and enable the agentgateway integration.
-
Verify that the agentgateway integration is enabled.
helm get values kgateway -n kgateway-system -o yamlExample output:
agentgateway: enabled: true
Set up an agentgateway proxy
-
Create a Gateway that uses the
agentgatewayGatewayClass. The following example sets up Gateway that uses the default agentgateway proxy template.kubectl apply -f- <<EOF kind: Gateway apiVersion: gateway.networking.k8s.io/v1 metadata: name: agentgateway namespace: kgateway-system labels: app: agentgateway spec: gatewayClassName: agentgateway listeners: - protocol: HTTP port: 8080 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
agentgatewayproxy: The pod has one container:agent-gateway.
kubectl get gateway agentgateway -n kgateway-system kubectl get deployment agentgateway -n kgateway-systemExample output:
NAME CLASS ADDRESS PROGRAMMED AGE agentgateway agentgateway a1cff4bd974a34d8b882b2fa01d357f0-119963959.us-east-2.elb.amazonaws.com True 6m9s NAME READY UP-TO-DATE AVAILABLE AGE agentgateway 1/1 1 1 6m11s -
Get the external address of the gateway and save it in an environment variable.
export INGRESS_GW_ADDRESS=$(kubectl get svc -n kgateway-system agentgateway -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}") echo $INGRESS_GW_ADDRESSkubectl port-forward deployment/agentgateway -n kgateway-system 8080:8080
Next
Explore how you can use agentgateway by checking out guides for the most common use cases: