Create an Agent Gateway

This guide walks you through deploying an instance of the AgentGateway custom resource.

An AgentGateway is like a Kubernetes Gateway in that there might be many different implementations (also known as "classes"). Example implementations of the Kubernetes Gateway specification include Envoy Gateway, Cilium, or amazon-vpc-lattice).

One implementation of the AgentGateway specification is based on KrakenD. This guide explains how to instantiate one such instance of an AgentGateway.

Before following this guide, make sure you have some kind of Agent Gateway Operator installed. See Install the Agent Gateway KrakenD Operator for one example.

Create an AgentGateway Resource

  1. Create a AgentGateway resource file:

    apiVersion: runtime.agentic-layer.ai/v1alpha1
    kind: AgentGateway
    metadata:
      name: agent-gateway
      namespace: agent-gateway
    spec:
      replicas: 1
      timeout: 5m0s
  2. Apply the configuration:

    kubectl apply -f my-agentgateway.yaml

Verify the Deployment

  1. Check the AgentGateway status:

    kubectl get agentgateways agent-gateway -n agent-gateway
  2. Verify the created resources:

    # Check the deployment created by the operator
    kubectl get deployments -l app=agent-gateway -A
    
    # Check the service
    kubectl get services -l app=agent-gateway -A
    
    # Check the configmap with KrakenD configuration
    kubectl get configmaps agent-gateway-krakend-config -n agent-gateway
  3. Check the pod logs to ensure KrakenD started successfully:

    kubectl logs -l app=agent-gateway -n agent-gateway