15

I have a Kubernetes cluster in which I have multiple ingress controllers. I have deleted the source file of one ingress controller. How can I delete the ingress controller that I don't want further ??

ashique
  • 935
  • 2
  • 8
  • 26
  • Do you want to remove Ingress Controller (https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) or Ingress resource, since you mentioned about source file, and I think it maybe yaml file? If you indeed want to remove Ingress Controller, so it depends how you installed it. – Andrew Skorkin Jan 26 '22 at 10:32

1 Answers1

41

first of all, you can follow below steps without manifest files:

  1. get the namespace which your ingress controller installed in
   kubectl get ns 

for example : ingress-nginx

2- remove all resources in this namespace

kubectl delete all  --all -n ingress-nginx

if your ingress controller is not installed in a dedicated namespace so you will have to remove resources one by one .

kubectl delete ingress ingress-nginx
kubectl delete deployment ingress-nginx
kubectl delete service ingress-nginx
sameh Ammar
  • 609
  • 4
  • 3
  • 2
    The ingress-nginx deployment YML's are quite large, are you sure everything they do is restricted to the namespace? (ie. does this really remove the whole thing?) – LFLFM Apr 21 '22 at 12:38
  • 5
    that was bad advice.. to remove everything – ses Jan 02 '23 at 23:01