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

Would like a descheduler that evicts pods have preferred node anti-affinity #1385

Open
darrellschrag opened this issue May 1, 2024 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@darrellschrag
Copy link

darrellschrag commented May 1, 2024

Is your feature request related to a problem? Please describe.
I typically try to schedule multiple replicas of pods across worker nodes. This helps reduce impact if a node is lost. I typically use preferred so that if I do lose a node, I will maintain my desired replica count. If a node is lost and no more are available, Kube will reschedule the pod on a node that already has one. When a new node is added back to the cluster, the descheduler does not evict one of the 2 pods on a single node so it can be rescheduled back to the new 3rd node.

  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchExpressions:
            - key: app
              operator: In
              values:
              - app-name
          topologyKey: kubernetes.io/hostname

Describe the solution you'd like
My deployment spreads 3 pods across 3 nodes. I have the above preferred anti-affinity configuration. When a node is lost, a new pod is created on one of the 2 remaining nodes (preferred). When a 3rd node is reintroduced into the cluster, I want the descheduler to evict one of the 2 pods running on a single node so it can be rescheduled onto the new 3rd node.

Describe alternatives you've considered
Manually killing the pod.

What version of descheduler are you using?
descheduler version: 0.29

Additional context

@darrellschrag darrellschrag added the kind/feature Categorizes issue or PR as related to a new feature. label May 1, 2024
@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/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 Jul 30, 2024
@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@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 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

3 participants