How to install consul on a different namespace?

I have installed consul on default namespace using helm.

helm install -f config.yaml consul hashicorp/consul --version "0.32.1"

I tried uninstall of consul using

helm delete consul

And installing again using.

kubectl create namespace consul
helm install -f config.yaml consul hashicorp/consul --version "0.32.1" --namespace consul

Now, getting error as below.

error

I followed this approach

Hi, you still have ingress gateway resources around. Unfortunately they are kinda difficult to delete:

  1. Find out which CRDs are still around with kubectl get crd | grep consul
  2. For each type (e.g. ingressgateway), find the remaining resources: kubectl get ingressgateway)
  3. For each remaining resource you need to edit the resource and set the finalizers array to empty ([]). This will allow kube to delete the resource. You can use kubectl edit ingressgateway <name> to edit the resource.

After you do all this kubectl get crd | grep consul should return no remaining CRDs and you can re-install.