Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl drain does not attempt to wait for any rescheduling #31487

Closed
mikekap opened this issue Aug 26, 2016 · 5 comments
Closed

kubectl drain does not attempt to wait for any rescheduling #31487

mikekap opened this issue Aug 26, 2016 · 5 comments
Labels
area/kubectl lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@mikekap
Copy link
Contributor

mikekap commented Aug 26, 2016

Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

Kubernetes version (use kubectl version): 1.3.5

Environment:

  • Cloud provider or hardware configuration: AWS EC2 (using Autoscaling)
  • OS (e.g. from /etc/os-release): Ubuntu Xenial

What happened:
When doing a rolling update of the nodes, I ran into some downtime even though I was carefully draining & restarting machines one at a time. The scenario was:

  • Drain first node
  • Replace said node with a new node (automatically via ASG)
  • Wait for kube to stabilize (i.e. all pods scheduled)
  • Drain second node
  • Watch as one of my deployments gets fully killed.

kubectl drain didn't notice that the scheduler put an entire replica set on the same node.

What you expected to happen:
I believe this is an artifact of resource scarcity - the scheduler normally attempts to distribute replica sets. Fixing this in the scheduler would perhaps be a lot harder since the scheduler would need to relocate the pod when the new node comes online.

Instead it would be nice if kubectl drain maintained an invariant like "at least one pod in each replica set that has at least 2 pods needs to be alive at any time".

How to reproduce it (as minimally and precisely as possible): Try instructions above with only 2 nodes.

Anything else do we need to know:

@hjacobs
Copy link

hjacobs commented Feb 11, 2017

@mikekap isn't this what Pod Disruption Budget is for?

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@xiangpengzhao
Copy link
Contributor

/sig cli

@k8s-ci-robot k8s-ci-robot added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Jun 20, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 20, 2017
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2017
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 28, 2018
@fejta-bot
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

No branches or pull requests

6 participants