FluxCD
Install agentgateway and related components.
In this installation guide, you install agentgateway in a Kubernetes cluster by using Flux. Flux is a CNCF-graduated, GitOps-based continuous delivery tool that reconciles cluster state from a Git repository or OCI registry. This approach uses the agentgateway Helm charts that are published as OCI artifacts to cr.agentgateway.dev.
Before you begin
- Create or use an existing Kubernetes cluster.
- Install the following command-line tools.
kubectl, the Kubernetes command line tool. Download thekubectlversion that is within one minor version of the Kubernetes clusters you plan to use.
- If you do not already have Flux installed in your cluster, install it by following the Flux installation guide. You can use the
fluxCLI, the Flux Operator, or any other supported method.
Install
Install agentgateway by using Flux. The following steps use kubectl apply so you can try the procedure quickly, but in a GitOps workflow you would commit the same manifests to the Git or OCI source that Flux reconciles and let the controllers apply them for you.
Create a
gateway-apinamespace and install the custom resources of the Kubernetes Gateway API version 1.5.0 by creating aGitRepositorysource and aKustomizationthat reconciles thestandardCRD channel from the upstream repository.kubectl apply -f- <<EOF apiVersion: v1 kind: Namespace metadata: name: gateway-api --- apiVersion: source.toolkit.fluxcd.io/v1 kind: GitRepository metadata: name: gateway-api namespace: gateway-api spec: interval: 1h url: https://github.com/kubernetes-sigs/gateway-api ref: tag: v1.5.0 sparseCheckout: - config/crd/standard --- apiVersion: kustomize.toolkit.fluxcd.io/v1 kind: Kustomization metadata: name: gateway-api namespace: gateway-api spec: interval: 1h prune: true sourceRef: kind: GitRepository name: gateway-api path: ./config/crd/standard EOFIf you need to use an experimental feature such as TCPRoutes, reconcile the experimental channel by settingsparseCheckout: [config/crd/experimental]on theGitRepositoryandpath: ./config/crd/experimentalon theKustomization. For more information, see Experimental features in Gateway API.Create the
agentgateway-systemnamespace and theOCIRepositoryandHelmReleaseresources that install the agentgateway CRD and control plane charts into it. You might also need the following values:- Development builds:
controller.image.pullPolicy=Alwaysto ensure you get the latest image. - Experimental Gateway API features:
controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=trueto enable experimental features such as TCPRoutes.
kubectl apply -f- <<EOF apiVersion: v1 kind: Namespace metadata: name: agentgateway-system --- apiVersion: source.toolkit.fluxcd.io/v1 kind: OCIRepository metadata: name: agentgateway-crds namespace: agentgateway-system spec: interval: 5m url: oci://cr.agentgateway.dev/charts/agentgateway-crds ref: tag: v1.1.0 --- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: agentgateway-crds namespace: agentgateway-system spec: interval: 5m releaseName: agentgateway-crds chartRef: kind: OCIRepository name: agentgateway-crds upgrade: strategy: name: RetryOnFailure retryInterval: 5m --- apiVersion: source.toolkit.fluxcd.io/v1 kind: OCIRepository metadata: name: agentgateway namespace: agentgateway-system spec: interval: 5m url: oci://cr.agentgateway.dev/charts/agentgateway ref: tag: v1.1.0 --- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: agentgateway namespace: agentgateway-system spec: dependsOn: - name: agentgateway-crds interval: 5m releaseName: agentgateway chartRef: kind: OCIRepository name: agentgateway upgrade: strategy: name: RetryOnFailure retryInterval: 5m values: controller: image: pullPolicy: Always extraEnv: KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES: "true" EOF- Development builds:
Verify that the
HelmReleaseresources reconcile successfully.kubectl get helmrelease -n agentgateway-systemExample output:
NAME AGE READY STATUS agentgateway 2m True Helm install succeeded for release agentgateway-system/agentgateway.v1 agentgateway-crds 2m True Helm install succeeded for release agentgateway-system/agentgateway-crds.v1Verify that the control plane is up and running.
kubectl get pods -n agentgateway-systemExample output:
NAME READY STATUS RESTARTS AGE agentgateway-6b5bb4db6b-c2pkq 1/1 Running 0 4m4sVerify that the
agentgatewayGatewayClass is created. You can optionally take a look at how the GatewayClass is configured by adding the-o yamloption to your command.kubectl get gatewayclass agentgateway
Next steps
Now that you have agentgateway set up and running, check out the following guides to expand your gateway capabilities.
- Set up your agentgateway proxy.
- Review the LLM consumption, inference routing, MCP, or agent connectivity guides to learn more about common agentgateway use cases.
Cleanup
You can remove the resources that you created in this guide.Follow the Uninstall with Flux guide.