Get started with kgateway
Get started with kgateway, a cloud-native Layer 7 proxy that is based on the Envoy and Kubernetes Gateway API projects.
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 clusterInstall
The following steps get you started with a basic installation. For detailed instructions, see the installation guides.
-
Deploy the Kubernetes Gateway API CRDs.
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yamlkubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/experimental-install.yaml -
Deploy the kgateway CRDs by using Helm.
helm upgrade -i --create-namespace --namespace kgateway-system --version v2.2.0-main \ kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds \ --set controller.image.pullPolicy=Always -
Install kgateway by using Helm. Choose the data plane gateway proxy that you want to use, such as kgateway for API ingress or agentgateway for AI use cases. To use experimental Gateway API features, include the experimental feature gate,
--set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true.helm upgrade -i --namespace kgateway-system --version v2.2.0-main \ kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \ --set controller.image.pullPolicy=Always \ --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=truehelm upgrade -i --namespace kgateway-system --version v2.2.0-main kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \ --set agentgateway.enabled=true \ --set controller.image.pullPolicy=Always \ --set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true -
Make sure that
kgatewayis running.kubectl get pods -n kgateway-systemExample 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 the data plane by choosing a gateway proxy depending on your use case.
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.
Set up an AI gateway with an MCP sample tool server. This guide uses the agentgateway proxy to set up an AI gateway that you can use for Model Context Protocol (MCP), agent-to-agent (A2A), large language model (LLM), and more AI-related use cases. The example deploys a sample MCP server with afetch tool, exposes the tool with agentgateway, and tests the tool with the MCP Inspector UI.
Cleanup
No longer need kgateway? Uninstall with the following command:
helm uninstall kgateway -n kgateway-system