Docs Local Kubernetes Blog Enterprise Community Get Started GitHub

Uninstall

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.
  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>
  7. 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
  8. 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.4.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
  1. Port-forward the Argo CD server on port 9999.

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

    argocd login localhost:9999 --username admin --password gateway --insecure
  3. Delete the agentgateway application.

    argocd app delete agentgateway-helm --cascade --server localhost:9999 --insecure

    Example output:

    Are you sure you want to delete 'agentgateway-helm' and all its resources? [y/n] y
    application 'agentgateway-helm' deleted   
  4. Delete the agentgateway CRD application.

    argocd app delete agentgateway-crds-helm --cascade --server localhost:9999 --insecure

    Example output:

    Are you sure you want to delete 'agentgateway-crds-helm' and all its resources? [y/n] y
    application 'agentgateway-crds-helm' deleted   
  5. 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.
  6. Remove the agentgateway-system namespace.

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

    kubectl delete namespace argocd