Before you begin

Follow the Get started guide to install the Enterpise edition of Gloo Gateway. Note that after you set up the Gloo Gateway control plane, you do not need to continue the guide to create an API gateway or deploy sample apps.

Set up Gloo AI Gateway

  1. Create a GatewayParameters resource which enables an AI extension for the gateway.

      kubectl apply -f- <<EOF
    apiVersion: gateway.gloo.solo.io/v1alpha1
    kind: GatewayParameters
    metadata:
      name: gloo-gateway-override
      namespace: gloo-system
    spec:
      kube:
        aiExtension:
          enabled: true
    EOF
      
  2. Set up Gloo AI Gateway by creating a Gateway resource with the custom GatewayParameters.

      kubectl apply -f- <<EOF
    kind: Gateway
    apiVersion: gateway.networking.k8s.io/v1
    metadata:
      name: ai-gateway
      namespace: gloo-system
      annotations:
        gateway.gloo.solo.io/gateway-parameters-name: gloo-gateway-override
    spec:
      gatewayClassName: gloo-gateway
      listeners:
      - protocol: HTTP
        port: 8080
        name: http
        allowedRoutes:
          namespaces:
            from: All
    EOF
      
  3. Verify that the AI gateway is created. Note that it might take a few minutes for an address to be assigned.

      kubectl get gateway ai-gateway -n gloo-system
      

    Example output:

      NAME         CLASS          ADDRESS       PROGRAMMED   AGE
    ai-gateway   gloo-gateway   XX.XX.XX.XX   True         32s
      

Next

Explore how to connect the gateway to an LLM provider and successfully authenticate so that you can use AI services.