Docs Local Kubernetes Blog Enterprise Community Get Started GitHub

Gateway setup

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.