Re: [kubernetes/kubernetes] Users should be able to delete in a way that respects PodDisruptionBudgets (#39824)

2 views
Skip to first unread message

Brian Grant

unread,
Jun 1, 2018, 12:37:00 AM6/1/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

cc @kubernetes/sig-cli-feature-requests @kubernetes/sig-apps-feature-requests


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Xavier Guérin

unread,
Jul 5, 2018, 12:08:15 PM7/5/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Also relevant to my interest. Sequentially deleting pods in a StatefulSet respect the PDB. Batch-delete the pods with their label does not. The documentation does not make such a distinction. What is the proper approach to avoid batch-delete voluntary disruptions?

fejta-bot

unread,
Oct 3, 2018, 1:02:47 PM10/3/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

unread,
Nov 2, 2018, 2:58:49 PM11/2/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

Andrew Garrett

unread,
Nov 2, 2018, 7:24:58 PM11/2/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/remove-lifecycle rotten

if we had this feature would simplify so many of our scripts 😭

Matt Brown

unread,
Nov 6, 2018, 11:45:54 AM11/6/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@2rs2ts

BTW the docs on disruptions say that directly deleting a pod is a voluntary disruption, to which PodDisruptionBudgets apply: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/

I think this section of the document is worded ambiguously - is it attempting to say that these typical application owner actions are all voluntary disruptions, or just listing actions that are application owner actions?

We call other cases voluntary disruptions. These include both actions initiated by the application owner and those initiated by a Cluster Administrator. Typical application owner actions include:

  • deleting the deployment or other controller that manages the pod
  • updating a deployment's pod template causing a restart
  • directly deleting a pod (e.g. by accident)

Zhixin Wen

unread,
Dec 2, 2018, 10:05:23 PM12/2/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

I agree. The doc gives a false sense that all the voluntary disruptions are constrained by PDB, which should be more clear.

Joseph Irving

unread,
Dec 7, 2018, 11:42:29 AM12/7/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Yeah that doc could do with some rewording to make it clear what actions obey the PDB, currently it gives example of non voluntary disruptions like hardware failure, node deletion etc but then it seems to imply that something like deleting a deployment is a voluntary disruption and would therefore obey PDB.

This doesn't make any sense to me, if I've deleted a deployment I do not expect my pods to stay around.

If people think kubectl evict command would be useful it's probably a good idea to create a KEP over at https://github.com/kubernetes/enhancements to help move this forward.

krmayankk

unread,
Dec 7, 2018, 1:08:53 PM12/7/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

imo kubectl delete --respect-pdb is more intuitive. People know what delete does, and now they want it to respect disruption budgets. evict introduces a new verb which is known to expert api user but probably needs more explaining to kubectl user.

Also am i reading this correctly that StatefulSets doesnt respect PDB ?

Jordan Liggitt

unread,
Dec 17, 2018, 8:03:16 PM12/17/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Does kubectl drain respect PDB?

krmayankk

unread,
Dec 17, 2018, 8:50:54 PM12/17/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

fejta-bot

unread,
Mar 17, 2019, 10:18:08 PM3/17/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

krmayankk

unread,
Mar 18, 2019, 2:36:24 AM3/18/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/remove-lifecycle stale

krmayankk

unread,
Mar 18, 2019, 2:45:26 AM3/18/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

i see that documentation has been fixed to make it clearer that kubectl delete pods wont respect pdb, but is there more needed ?

  • should we add kubectl delete pod --respect-pdb like thing
  • do we need kubectl evict
  • what about kubectl delete deployments/statefulsets ?

Jordan Liggitt

unread,
Mar 18, 2019, 9:19:57 AM3/18/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention
  • should we add kubectl delete pod --respect-pdb like thing

delete is a generic method... I don't think overloading one specific resource to use a different API is a good idea

do we need kubectl evict

doesn't kubectl drain use the eviction endpoint already? what would the behavior of an evict command be? if eviction was rejected, would the command succeed or fail?

what about kubectl delete deployments/statefulsets?

Deletion of a pod-creating controller is intended to remove all pods owned by that controller by default. Preventing cleanup of orphaned pods to avoid "disruption" could result in stuck pods.

fejta-bot

unread,
Jun 16, 2019, 9:30:23 AM6/16/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

unread,
Jul 16, 2019, 10:18:02 AM7/16/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

fejta-bot

unread,
Aug 15, 2019, 11:02:06 AM8/15/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

Kubernetes Prow Robot

unread,
Aug 15, 2019, 11:02:19 AM8/15/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

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

Kubernetes Prow Robot

unread,
Aug 15, 2019, 11:02:31 AM8/15/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Closed #39824.

shacharSilbert

unread,
Sep 23, 2019, 6:59:28 AM9/23/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/reopen

Any other way I could test that my PDB works if I can't delete pods and see that it doesn't delete?

And the guys here are right, there is a documentation issue where it is understood deleting a pod should take PDB into account.

Kubernetes Prow Robot

unread,
Sep 23, 2019, 6:59:47 AM9/23/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@shacharSilbert: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Any other way I could test that my PDB works if I can't delete pods and see that it doesn't delete?

And the guys here are right, there is a documentation issue where it is understood deleting a pod should take PDB into account.

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.

Florian Boucault

unread,
Aug 26, 2020, 3:22:27 PM8/26/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

BTW the docs on disruptions say that directly deleting a pod is a voluntary disruption, to which PodDisruptionBudgets apply: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/

Documentation now states:

Caution: Not all voluntary disruptions are constrained by Pod Disruption Budgets. For example, deleting deployments or pods bypasses Pod Disruption Budgets.

from https://kubernetes.io/docs/concepts/workloads/pods/disruptions/


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

bLaX

unread,
Jan 21, 2021, 3:08:51 AM1/21/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

the documentation today is very confusing still, especially this line (https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#voluntary-and-involuntary-disruptions)

We call other cases voluntary disruptions. These include both actions initiated by the application owner and those initiated by a Cluster Administrator. Typical application owner actions include:

  • deleting the deployment or other controller that manages the pod
  • updating a deployment's pod template causing a restart
  • directly deleting a pod (e.g. by accident)

And NONE of these will respect the PDB constraint

Kenneth Abrams

unread,
Mar 1, 2021, 12:30:00 PM3/1/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/remove-lifecycle rotten

Deleting pods should respect pod disruption budget. 3 years and this still is not solved.

Ohad Schneider

unread,
Dec 27, 2023, 3:35:25 PM12/27/23
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Any other way I could test that my PDB works if I can't delete pods and see that it doesn't delete?

And the guys here are right, there is a documentation issue where it is understood deleting a pod should take PDB into account.

It looks like a plugin has been created for this purpose exactly: https://github.com/ueokande/kubectl-evict


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/39824/1870610757@github.com>

Reply all
Reply to author
Forward
0 new messages