Get started with kgateway

Get started with kgateway. Kgateway is a control plane that implements the Kubernetes Gateway API for both microservices and AI workloads. The control plane translates your Kubernetes Gateway API resources into the configuration that the underlying data plane proxy can understand. The proxy layer is handled by kgateway’s implementation of Envoy for microservices or agentgateway for AI workloads.

Before you begin

These quick start steps assume that you have a Kubernetes cluster, kubectl, and helm already set up. For quick testing, you can use Kind.

kind create cluster

Install

The following steps get you started with a basic installation. For detailed instructions, see the installation guides.

  1. Deploy the Kubernetes Gateway API CRDs.

    kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml

    CRDs in the experimental channel are required to use some experimental features in the Gateway API. Guides that require experimental CRDs note this requirement in their prerequisites.

    kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/experimental-install.yaml
  2. Deploy the kgateway CRDs by using Helm.

    helm upgrade -i kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds \
    --create-namespace --namespace kgateway-system \
    --version v2.2.0-main \
    --set controller.image.pullPolicy=Always

  3. Install kgateway by using Helm. To use experimental Gateway API features, include the experimental feature gate, --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true.

    helm upgrade -i kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \
    --namespace kgateway-system \
    --version v2.2.0-main \
    --set controller.image.pullPolicy=Always \
    --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true

  4. Make sure that the kgateway control plane is running.

    kubectl get pods -n kgateway-system

    Example output:

    NAME                        READY   STATUS    RESTARTS   AGE
    kgateway-5495d98459-46dpk   1/1     Running   0          19s
    

Good job! You now have the kgateway control plane running in your cluster.

Next steps

Set up an API gateway with an httpbin sample app. This guide uses the Envoy-based kgateway proxy to set up an API gateway. Then, deploy a sample httpbin app, configure a basic HTTP listener on the API gateway, and route traffic to httpbin by using an HTTPRoute resource.

Cleanup

No longer need kgateway? Uninstall with the following command:

helm uninstall kgateway -n kgateway-system