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.
Get all HTTP routes in your environment.
kubectl get httproutes -ARemove each HTTP route.
kubectl delete -n <namespace> httproute <httproute-name>Get all reference grants in your environment.
kubectl get referencegrants -ARemove each reference grant.
kubectl delete -n <namespace> referencegrant <referencegrant-name>Get all gateways in your environment that are configured by the
agentgatewaygateway class.kubectl get gateways -A | grep agentgatewayRemove each gateway.
kubectl delete -n <namespace> gateway <gateway-name>
Uninstall the control plane.
Uninstall the agentgateway Helm release.
helm uninstall agentgateway -n agentgateway-systemDelete the CRDs.
helm uninstall agentgateway-crds -n agentgateway-systemRemove the
agentgateway-systemnamespace.kubectl delete namespace agentgateway-systemConfirm that the CRDs are deleted.
kubectl get crds | grep agentgateway || true
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.
Port-forward the Argo CD server on port 9999.
kubectl port-forward svc/argocd-server -n argocd 9999:443Open the Argo CD UI.
Log in with the
adminusername andgatewaypassword.Find the application that you want to delete and click x.
Select Foreground and click Ok.
Verify that the pods were removed from the
agentgateway-systemnamespace.kubectl get pods -n agentgateway-systemExample output:
No resources found in agentgateway-system namespace.Remove the
agentgateway-systemnamespace.kubectl delete namespace agentgateway-systemRemove the
argocdnamespace.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.
Delete the agentgateway
HelmReleaseandOCIRepositoryresources. 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-crdsVerify that the pods were removed from the
agentgateway-systemnamespace.kubectl get pods -n agentgateway-systemExample output:
No resources found in agentgateway-system namespace.Remove the
agentgateway-systemnamespace.kubectl delete namespace agentgateway-systemDelete the Kubernetes Gateway API
KustomizationandGitRepository. Because theKustomizationwas created withprune: true, Flux removes the Gateway API CRDs from the cluster. Then remove thegateway-apinamespace.kubectl delete kustomization -n gateway-api gateway-api kubectl delete gitrepository -n gateway-api gateway-api kubectl delete namespace gateway-apiIf 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.