Install Kong Operator for Kong AI Gateway

TL;DR

Install Kong Operator using Kong’s kong-operator chart with --set env.ENABLE_CONTROLLER_AIGATEWAYDATAPLANE=true to enable the AI Gateway data plane controller, then store your Konnect credentials in a Kubernetes Secret.

Prerequisites

If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.

  1. The following Konnect items are required to complete this tutorial:
    • Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
  2. Set the personal access token as an environment variable:

    export KONNECT_TOKEN='YOUR KONNECT TOKEN'

This guide walks through a complete Kong AI Gateway setup using Kong Operator and Konnect.

By the end of the series, you will have:

  • A Konnect Kong AI Gateway control plane
  • An AI Model Provider (OpenAI) and an AI Model
  • An Kong AI Gateway data plane running in Kubernetes
  • AI Prompt Guard Policies enforcing content governance
  • Authenticated AI Consumers with per-team API keys

Create the Kubernetes namespace

Create the namespace used throughout this series:

kubectl create namespace kong

Install Kong Operator

  1. Add the Kong Helm charts:

    helm repo add kong https://charts.konghq.com
    helm repo update
  2. Install Kong Operator using Helm:

    helm upgrade --install kong-operator kong/kong-operator -n kong-system \
      --create-namespace \
      --set image.tag=2.3 \
      --set env.ENABLE_CONTROLLER_KONNECT=true \
      --set env.ENABLE_CONTROLLER_AIGATEWAYDATAPLANE=true

    If you want cert-manager to issue and rotate the admission and conversion webhook certificates, install cert-manager to your cluster and enable cert-manager integration by passing the following argument while installing, in the next step:

    --set global.webhooks.options.certManager.enabled=true

    If you do not enable this, the chart will generate and inject self-signed certificates automatically. We recommend enabling cert-manager to manage the lifecycle of these certificates. Kong Operator needs a certificate authority to sign the certificate for mTLS communication between the control plane and the data plane. This is handled automatically by the Helm chart. If you need to provide a custom CA certificate, refer to the certificateAuthority section in the values.yaml of the Helm chart to learn how to create and reference your own CA certificate.

Verify AI Gateway CRDs

Confirm the AI Gateway CRDs are registered in the cluster:

kubectl get crd | grep -E "aigateway|aigatewaydataplane"

You should see entries for konnectaigateways, aigatewaymodelproviders, aigatewaymodels, aigatewaypolicies, aigatewayauthstrategies, aigatewayconsumers, aigatewayconsumercredentials, aigatewayconsumergroups, aigatewayagents, aigatewaydataplanecertificates, and aigatewaydataplanes.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!