Uninstall
If you no longer need your kgateway 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 kgateway
Remove the kgateway control plane and gateway proxies.
-
Get all HTTP routes in your environment.
kubectl get httproutes -A
-
Remove each HTTP route.
kubectl delete -n <namespace> httproute <httproute-name>
-
Get all reference grants in your environment.
kubectl get referencegrants -A
-
Remove each reference grant.
kubectl delete -n <namespace> referencegrant <referencegrant-name>
-
Get all gateways in your environment that are configured by the
kgateway
gateway class.kubectl get gateways -A | grep kgateway
-
Remove each gateway.
kubectl delete -n <namespace> gateway <gateway-name>
-
Uninstall kgateway.
-
Uninstall the kgateway release.
helm uninstall kgateway -n kgateway-system
-
Remove the
kgateway-system
namespace.kubectl delete namespace kgateway-system
-
-
Remove the Kubernetes Gateway API CRDs.
kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.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:443
-
Open the Argo CD UI.
-
Log in with the
admin
username andkgateway
password. -
Find the application that you want to delete and click x.
-
Select Foreground and click Ok.
-
Verify that the pods were removed from the
kgateway-system
namespace.kubectl get pods -n kgateway-system
Example output:
No resources found in kgateway-systemnamespace.
-
Port-forward the Argo CD server on port 9999.
kubectl port-forward svc/argocd-server -n argocd 9999:443
-
Log in to the Argo CD UI.
argocd login localhost:9999 --username admin --password kgateway --insecure
-
Delete the application.
argocd app delete kgateway-oss-helm --cascade --server localhost:9999 --insecure
Example output:
Are you sure you want to delete 'kgateway-oss-helm' and all its resources? [y/n] y application 'kgateway-oss-helm' deleted
-
Verify that the pods were removed from the
kgateway-system
namespace.kubectl get pods -n kgateway-system
Example output:
No resources found in kgateway-system namespace.
Uninstall optional components
Remove any optional components that you no longer need, such as sample apps.
-
If you no longer need the Prometheus stack to monitor resources in your cluster, uninstall the release and delete the namespace.
helm uninstall kube-prometheus-stack -n monitoring kubectl delete namespace monitoring
-
Remove the httpbin sample app.
kubectl delete -f https://raw.githubusercontent.com/kgateway-dev/kgateway/refs/heads/main/examples/httpbin.yaml
-
Remove the Petstore sample app.
kubectl delete -f https://raw.githubusercontent.com/kgateway-dev/kgateway.dev/main/assets/docs/examples/petstore.yaml