Use Manifests to uninstall NGINX Gateway Fabric

This page describes how to use Manifests to uninstall NGINX Gateway Fabric, its custom resource definitions, and its Gateway API resources.

By following these instrucions, you will remove NGINX Gateway Fabric and all Gateway resources from a Kubernetes cluster.

Remove NGINX Gateway Fabric

To remove NGINX Gateway Fabric run:

shell
kubectl delete namespace nginx-gateway
kubectl delete clusterrole nginx-gateway
kubectl delete clusterrolebinding nginx-gateway

Delete the custom resource definitions

To remove the NGINX Gateway Fabric custom resource definitions, run:

kubectl delete -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v2.3.0/deploy/crds.yaml
Example output
text
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" deleted

Remove the Gateway API resources

To uninstall the Gateway API resources, run the command based on your deployment type:

kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v2.3.0" | kubectl delete -f -
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/experimental?ref=v2.3.0" | kubectl delete -f -
Example output
text
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" deleted