# kubernetes – How to delete ingress from default namespace

While Ali Rezvani’s answer is correct, I’d like to extend upon it.

kubectl commands are structured as follows:

kubectl ACTION RESOURCE NAME [ -n NAMEPACE ]


Where ACTION can be get, delete, describe, etc.

RESOURCE can be deployments, service, pods, ingress or one of its short forms: deploy, svc, po, or ing

NAME is the name of the resource(s) you want to apply the ACTION on.

So if you wanted to delete the ingress named abc-ingress in the namespace default, you would use:

kubectl delete ingress abc-ingress -n default


(side note: generally, normally you can omit -n default as the default namespace is normally, as the name suggests, the default namespace)