Set up an agentgateway

Set up an agentgateway proxy.

Before you begin

Install the agentgateway control plane.

Set up an agentgateway proxy

  1. Create a Gateway that uses the agentgateway GatewayClass. 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
  2. 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-system

    Example 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
  3. Verify that the external IP has been created and is not pending.

    kubectl get svc -n agentgateway-system agentgateway-proxy

    Example output:

    NAME                 TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
    agentgateway-proxy   LoadBalancer   172.20.200.127   <pending>     80:30752/TCP   7m6s
  4. 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_ADDRESS
    kubectl port-forward deployment/agentgateway-proxy -n agentgateway-system 8080:80

Next

Explore how you can use agentgateway by checking out guides for the most common use cases:

You can also install the httpbin sample app and use this app to test traffic management, security, and resiliency guides with your agentgateway proxy.

Other configuration examples

Review other common configuration examples for your Gateway. To customize your Gateway even further, such as with Kubernetes overlays, check out Customize the gateway.

Static IP address

You can assign a static IP address to the service that exposes your gateway proxy by using the spec.addresses field.

kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: agentgateway-proxy
  namespace: agentgateway-system
spec:
  gatewayClassName: agentgateway
  addresses:
    - type: IPAddress
      value: 203.0.113.11
  listeners:
    - protocol: HTTP
      port: 80
      name: http
      allowedRoutes:
        namespaces:
          from: Same

Same namespace HTTPRoutes

Allow only HTTPRoutes that are in the same namespace as the Gateway to be attached to this Gateway (allowedRoutes.namespaces.from=Same).

kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: agentgateway-proxy
  namespace: agentgateway-system
spec:
  gatewayClassName: agentgateway
  listeners:
    - protocol: HTTP
      port: 80
      name: http
      allowedRoutes:
        namespaces:
          from: Same
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.