Use Helm to uninstall NGINX Ingress Controller

This page describes how to use Helm to uninstall F5 NGINX Ingress Controller.

It explains how to remove the chart, then remove the custom resource definitions (CRDs).

By following these instructions, you will remove NGINX Ingress Controller from your Kubernetes cluster.

Remove the Helm chart

To uninstall NGINX Ingress Controller, you must first remove the chart.

To remove a release named <my-release>, use the following command:

helm uninstall <my-release>

The command removes all the Kubernetes components associated with the release, then deletes the release itself.

Remove the CRDs

After removing the release, pull the chart sources:

helm pull oci://ghcr.io/nginx/charts/nginx-ingress --untar --version 2.3.1
Warning

The next command will delete all corresponding custom resources in your cluster across all namespaces.

Before using it, check there are no custom resources that you want to keep, and that there are no other NGINX Ingress Controller instances running in the cluster.

Then use kubectl to delete the CRDs:

kubectl delete -f crds/
Example output
text
customresourcedefinition.apiextensions.k8s.io "aplogconfs.appprotect.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "appolicies.appprotect.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "apusersigs.appprotect.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "apdoslogconfs.appprotectdos.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "apdospolicies.appprotectdos.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "dosprotectedresources.appprotectdos.f5.com" deleted
customresourcedefinition.apiextensions.k8s.io "dnsendpoints.externaldns.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "globalconfigurations.k8s.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "policies.k8s.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "transportservers.k8s.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "virtualserverroutes.k8s.nginx.org" deleted
customresourcedefinition.apiextensions.k8s.io "virtualservers.k8s.nginx.org" deleted
Shared resource versions

If you run multiple NGINX Ingress Controller releases in your cluster with custom resources enabled, every release will share a single version of the CRDs.

When uninstalling a release, ensure that you don’t remove the CRDs until there are no other NGINX Ingress Controller releases running in the cluster.

The Run multiple NGINX Ingress Controllers topic has more details.

Remove secrets

If your deployment used NGINX Plus, you should also remove the secrets created for your license and the F5 registry.

kubectl delete secret nplus-license
Example output
secret "nplus-license" deleted
kubectl delete secret regcred
Example output
secret "regcred" deleted