python icon indicating copy to clipboard operation
python copied to clipboard

how to ignore daemonset delete local data while calling create_namespaced_pod_eviction

Open infa-anisrini opened this issue 5 years ago • 6 comments

While draining from kubectl we use

kubectl drain <node> --delete-local-data --ignore-daemonsets

But how can i ignore daemonset and delete local data while calling create_namespaced_pod_eviction

infa-anisrini avatar Mar 16 '21 04:03 infa-anisrini

/assign @yliaog

roycaihw avatar Mar 29 '21 16:03 roycaihw

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#create-eviction-pod-v1-core https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/#eviction-api

create_namespaced_pod_eviction is the calling the eviction api on a given pod in a given namespace. The pod is determined before calling the api.

you may list the pods in a namespace, filter out all those pods that are managed by a daemonset, and include those pods that have local data (emptyDir), then call create_namespaced_pod_eviction

yliaog avatar Mar 29 '21 18:03 yliaog

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-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot avatar Jun 27 '21 18:06 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-contributor-experience at kubernetes/community. /lifecycle rotten

k8s-triage-robot avatar Jul 27 '21 19:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Aug 26 '21 19:08 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

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

k8s-ci-robot avatar Aug 26 '21 19:08 k8s-ci-robot