Skip to content

Uninstall

Uninstall kgateway and related components.

If you no longer need your agentgateway environment, you can uninstall the control plane and all gateway proxies. You can also optionally remove related components such as Prometheus and sample apps.

Uninstall

Remove the agentgateway control plane and gateway proxies.

Did you use Argo CD to install agentgateway? Skip to the Argo CD steps. For Flux installations, skip to the Flux steps.
  1. Get all HTTP routes in your environment.

    kubectl get httproutes -A
  2. Remove each HTTP route.

    kubectl delete -n <namespace> httproute <httproute-name>
  3. Get all reference grants in your environment.

    kubectl get referencegrants -A
  4. Remove each reference grant.

    kubectl delete -n <namespace> referencegrant <referencegrant-name>
  5. Get all gateways in your environment that are configured by the agentgateway gateway class.

    kubectl get gateways -A | grep agentgateway
  6. Remove each gateway.

    kubectl delete -n <namespace> gateway <gateway-name>
  1. Uninstall the control plane.

    1. Uninstall the agentgateway Helm release.

      helm uninstall agentgateway -n agentgateway-system
    2. Delete the CRDs.

      helm uninstall agentgateway-crds -n agentgateway-system
    3. Remove the agentgateway-system namespace.

      kubectl delete namespace agentgateway-system
    4. Confirm that the CRDs are deleted.

      kubectl get crds | grep agentgateway || true
  2. Remove the Kubernetes Gateway API CRDs. If you installed a different version or channel of the Kubernetes Gateway API, update the following command accordingly.

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

Uninstall with ArgoCD

For ArgoCD installations, use the following steps to clean up your environment.

  1. Port-forward the Argo CD server on port 9999.

    kubectl port-forward svc/argocd-server -n argocd 9999:443
  2. Open the Argo CD UI.

  3. Log in with the admin username and gateway password.

  4. Find the application that you want to delete and click x.

  5. Select Foreground and click Ok.

  6. Verify that the pods were removed from the agentgateway-system namespace.

    kubectl get pods -n agentgateway-system

    Example output:

    No resources found in agentgateway-system namespace.
  7. Remove the agentgateway-system namespace.

    kubectl delete namespace agentgateway-system
  8. Remove the argocd namespace.

    kubectl delete namespace argocd

Uninstall with FluxCD

If you followed the Flux installation steps and want to uninstall, use the following steps to undo them. If you instead manage the manifests from a Git or OCI source that Flux reconciles, remove them from that source and let the controllers prune the resources for you.

  1. Delete the agentgateway HelmRelease and OCIRepository resources. Flux uninstalls the corresponding Helm releases from the cluster.

    kubectl delete helmrelease -n agentgateway-system agentgateway agentgateway-crds
    kubectl delete ocirepository -n agentgateway-system agentgateway agentgateway-crds
  2. Verify that the pods were removed from the agentgateway-system namespace.

    kubectl get pods -n agentgateway-system

    Example output:

    No resources found in agentgateway-system namespace.
  3. Remove the agentgateway-system namespace.

    kubectl delete namespace agentgateway-system
  4. Delete the Kubernetes Gateway API Kustomization and GitRepository. Because the Kustomization was created with prune: true, Flux removes the Gateway API CRDs from the cluster. Then remove the gateway-api namespace.

    kubectl delete kustomization -n gateway-api gateway-api
    kubectl delete gitrepository -n gateway-api gateway-api
    kubectl delete namespace gateway-api
  5. If you no longer need Flux, uninstall it by following the Flux uninstallation guide or, if you installed it with the Flux Operator, the Flux Operator uninstall guide.

Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.