Use Manifests to uninstall NGINX Gateway Fabric
This page describes how to uninstall NGINX Gateway Fabric, its custom resource definitions (CRDs) and the Gateway API resources from a Kubernetes cluster.
These instructions are for a Manifest deployment: for a Helm deployment, view the Use Helm to uninstall NGINX Gateway Fabric topic.
To remove NGINX Gateway Fabric run:
kubectl delete namespace nginx-gateway
kubectl delete clusterrole nginx-gateway
kubectl delete clusterrolebinding nginx-gatewayTo remove the NGINX Gateway Fabric CRDs, run:
kubectl delete -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v2.2.2/deploy/crds.yamlExample output
customresourcedefinition.apiextensions.k8s.io "clientsettingspolicies.gateway.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "nginxgateways.gateway.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "nginxproxies.gateway.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "observabilitypolicies.gateway.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "snippetsfilters.gateway.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "upstreamsettingspolicies.gateway.nginx.org" deletedWarningThis step will remove all corresponding custom resources in your entire cluster, across every namespace.
Ensure you don’t have any custom resources you need to keep, and confirm that there are no other Gateway API implementations active in your cluster.
To uninstall the Gateway API resources, run the following:
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v2.2.2" | kubectl delete -f -Example output
customresourcedefinition.apiextensions.k8s.io "gatewayclasses.gateway.networking.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "gateways.gateway.networking.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "grpcroutes.gateway.networking.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "httproutes.gateway.networking.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "referencegrants.gateway.networking.k8s.io" deletedIf you installed the Gateway APIs from the experimental channel, run the following instead:
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v2.2.2" | kubectl delete -f -