kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

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

Open Vrtak-CZ opened this issue 9 years ago • 33 comments

kubectl delete all -l foo=bar

does not delete ingress with label foo=bar.

Vrtak-CZ avatar Apr 26 '17 13:04 Vrtak-CZ

~~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~~

mengqiy avatar Apr 27 '17 17:04 mengqiy

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

pwittrock avatar May 16 '17 21:05 pwittrock

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

Vrtak-CZ avatar May 17 '17 12:05 Vrtak-CZ

My comment was in response to @mengqiy.

@bowei is this your team?

pwittrock avatar May 31 '17 02:05 pwittrock

yes -- cc: @nicksardo

bowei avatar May 31 '17 03:05 bowei

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

bowei avatar May 31 '17 03:05 bowei

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

Vrtak-CZ avatar May 31 '17 11:05 Vrtak-CZ

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.

nicksardo avatar May 31 '17 16:05 nicksardo

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

bowei avatar May 31 '17 17:05 bowei

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

pwittrock avatar Jun 22 '17 02:06 pwittrock

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.

mengqiy avatar Jun 26 '17 23:06 mengqiy

dynamically populating "all"?

@pwittrock Can you give me an pointer to this?

mengqiy avatar Jun 26 '17 23:06 mengqiy

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

fejta-bot avatar Dec 30 '17 18:12 fejta-bot

/remove-lifecycle stale

bowei avatar Jan 04 '18 20:01 bowei

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

fejta-bot avatar Apr 04 '18 20:04 fejta-bot

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

fejta-bot avatar May 04 '18 20:05 fejta-bot

is there any progress?

Vrtak-CZ avatar May 05 '18 11:05 Vrtak-CZ

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 avatar Jun 04 '18 11:06 fejta-bot

~~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.

mengqiy avatar Jun 06 '18 06:06 mengqiy

/reopen

mengqiy avatar Jun 06 '18 16:06 mengqiy