kubectl: kubectl delete all -l foo=bar - does not delete ingress

kubectl delete all -l foo=bar

does not delete ingress with label foo=bar.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 33 (16 by maintainers)

Most upvoted comments

"kubectl delete ingress ingress-name -n namespace" . this should be working fine

If kubectl get all doesn’t show ingresses, then I’m glad kubectl delete all doesn’t delete ingresses. https://github.com/kubernetes/kubernetes/issues/42885

According to this https://github.com/kubernetes/kubernetes/pull/42954#issuecomment-286012772, changes are afoot.

kubectl delete all,ing -l app=bar -n foo works for me

Why is ingress not part of “all” if it is in the namespace?

This is because “all” is the name of a category, and the ingress resource type does not belong to the “all” category.

“all” is an unfortunate name for a category since it causes a lot of confusion with kubectl because people think that kubectl makes some determination about what should or should not be included in “all” when it is really just a category name.

If you have kubectl 1.26 or later, you can see which categories various resources belong to by running kubectl api-resources -o wide.

Yes but when i use kubectl delete all -l foo=bar -n baz it doesn’t work either.