Comments (12)
but could you tell your use case/scenario why would you want that?
Here are a few scenarios, where the host directory content does not necessarily require the pod to be on that node:
- Accessing special devices, e.g. a random number generator (one has to mount /dev), which exist on all or a subset of nodes.
- Communicating across Pods (e.g. one daemon set which is on every node and it communicates with workload pods through a file socket).
- Having a pre-populated cache on every node, which Pods can access, to reduce the dependency on shared storage for static/semi-static content.
In KubeVirt we start our VMs in Pods which have HostDirs, and we use all three techniques, but I don't think that they are just unique to us.
also could you elaborate on "based on the content in kubernetes.io/created-by"?
If I am not mistaken, the descheduler deschedules all pods which have that annotation and don't meet some other excluding preconditions (daemon set, host dir, ...), so if you wrote your own controller (which means that the controller adds it's name to the annotation), you could fine-tune the eviction rules for that type of controller. However, an annotation based solution, like you mentioned would also solve it, and might even be better.
Btw., do you plan to replace/extend that with a check for a controller reference?
from descheduler.
@yanirq yes, but could you tell your use case/scenario why would you want that? the reason to not evict a pod tied to hostDir is that it is possible the pod might end up on the same node making descheduling unnecessary? also could you elaborate on "based on the content in kubernetes.io/created-by"?
from descheduler.
@aveshagarwal we would like to allow descheduling of regular pods (without an association to RC or deployments) in our case scenario a pod represents a VM and we would like to run a migration process - move the pod to another node according to dscheduling assessment.
the meaning of using content in kubernetes.io/created-by is maybe using one of its attribute's value to signal that the pod can be up for descheduling although it has a hostDir.
will a pod tied to a hostDir necessarily end up on the same node ?
A bit more further - the ultimate goal of the migration process i mentioned above is to :
1.run descheduler
2.find a pod that can run on a better node
3.create a replacement pod
4.evict the current pod and get the replacement pod to run on the suggest node (forcefully by our migration process)
*A side note: this is also one of the reasons why we would desire the use of a scheduler simulator (dry-run scheduling)
from descheduler.
@aveshagarwal we would like to allow descheduling of regular pods (without an association to RC or deployments) in our case scenario a pod represents a VM and we would like to run a migration process - move the pod to another node according to dscheduling assessment.
Once the pod is descheduled, who would do migration if the pod is not associated with RC or deployments or Job or RS?
the meaning of using content in kubernetes.io/created-by is maybe using one of its attribute's value to signal that the pod can be up for descheduling although it has a hostDir.
i think people would not prefer changing kubernetes.io/created-by
for descheduler as it is an outside component. But having a pod annotated with something to signal it is a candidate for descheduling specifically or having a command line flag to allow descheduling pods with hostDir in general could be done.
will a pod tied to a hostDir necessarily end up on the same node ?
Depends how is that configured. But it is highly possible, as the pod was using storage on that node was the reason the pod was scheduled to that node.
A bit more further - the ultimate goal of the migration process i mentioned above is to :
1.run descheduler
2.find a pod that can run on a better node
3.create a replacement pod
4.evict the current pod and get the replacement pod to run on the suggest node (forcefully by our migration process)
what do you mean suggest node(forcefully by our migration process)
? It just sounds like you manually scheduler pod as a static pod or may be either using node affinity/node selectors.
*A side note: this is also one of the reasons why we would desire the use of a scheduler simulator (dry-run scheduling)
Having a dry run might be helpful. But as you said you want to force a pod on a node after migration, how would dry-run help here?
from descheduler.
@rmohr - Though the use-cases you provided seem reasonable, in most scenarios I think evicting pods which need hostDirs may cause data consistency problems. However having a force
option for descheduler which actually evicts all types of pods may solve your problem and justifies the name of descheduler
(so that it is disruptive in nature).
@aveshagarwal. Any further thoughts on this?
from descheduler.
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
from descheduler.
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
from descheduler.
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
from descheduler.
@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.
from descheduler.
/reopen
from descheduler.
@rmohr: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
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.
from descheduler.
Can this be reopened? It would still be useful.
from descheduler.
Related Issues (20)
- RemoveDuplicates does not working with azure aks 1.26.6 HOT 1
- Kubernetes 1.29 Release HOT 1
- 1.29: Update version references in docs and readme HOT 1
- Bump Kubernetes dependencies to v1.29.0 HOT 1
- 1.29: Update CI in test-infra HOT 1
- Create v0.29.0 tag on master HOT 1
- Promote v0.29.0 docker image HOT 1
- Helm chart version update to v0.29.0 HOT 1
- Cut release-1.29 branch HOT 1
- Publish v0.29.0 GitHub release HOT 1
- Email sig mailing list HOT 1
- Should we upgrade go version to 1.21? HOT 1
- Fix code scanning alert - ssh: Prefix truncation attack on Binary Packet Protocol (BPP) HOT 1
- Scraping Metrics from a CronJob HOT 6
- Kustomize template ref=v0.29.0 references to 0.28.1 HOT 1
- Deprecate CronJob deployment approach HOT 2
- Pods strategies don't work HOT 7
- IMDSv2
- Strategy RemovePodsViolatingNodeAffinity does not remove pod when affinity disappears HOT 1
- Single node clusters support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from descheduler.