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

Created on 26 Apr 2017  路  30Comments  路  Source: kubernetes/kubectl

kubectl delete all -l foo=bar

does not delete ingress with label foo=bar.

arekubectl kinbug lifecyclrotten prioritawaiting-more-evidence sicli

Most helpful comment

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.

All 30 comments

I think this is because of ingress is a cluster scoped resource.
https://github.com/kubernetes/community/blob/master/contributors/devel/kubectl-conventions.md#rules-for-extending-special-resource-alias---all

Ingress is namespaced. --all probably uses a static list somewhere.

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

My comment was in response to @mengqiy.

@bowei is this your team?

yes -- cc: @nicksardo

@Vrtak-CZ : do you have a minimal repro we can try? (e.g. ingress YAML)

sure

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: awesome-ingress
  namespace: foo
  labels:
    app: bar
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: awesome-service
          servicePort: 3000

and then I try kubectl delete all -l app=bar -n foo

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.

@pwittrock -- doesn't seem to be a networking related issue? Who should own this then?

@mengqiy Would you follow up on this and figure out if it was fixed in 1.7 with dynamically populating "all"?

I didn't find any code dynamically populating "all".
We still hard code all.
So we still don't support ingress and daemonset in all.

dynamically populating "all"?

@pwittrock Can you give me an pointer to this?

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

/remove-lifecycle stale

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

is there any progress?

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Ingress is a cluster scoped resource.
Per https://github.com/kubernetes/community/blob/9151896ac90a1a3bacb4f33768e7bde96abbde22/contributors/devel/kubectl-conventions.md#rules-for-extending-special-resource-alias---all, ingress should not be included.

EDIT:
Ingress is namespaced resource.

/reopen

This is still an issue for me, any updates?

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:53:20Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.9", GitCommit:"57729ea3d9a1b75f3fc7bbbadc597ba707d47c8a", GitTreeState:"clean", BuildDate:"2018-06-29T01:07:01Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

I have the same issue with kubectl get all not showing the Ingress as well. Could this be a version mismatch (i.e. running kubectl v1.11.1 against a server 1.9.9

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

/sig cli
/area kubectl
/kind bug

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

/remove-lifecycle stale

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

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whs-dot-hk picture whs-dot-hk  路  6Comments

3dbrows picture 3dbrows  路  6Comments

ameukam picture ameukam  路  5Comments

J-Siu picture J-Siu  路  4Comments

drpaneas picture drpaneas  路  3Comments