-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Clearer information about the emptyDir and correction for how topologyKey works #42780
Conversation
I believe the statement is confusing since we are in the emptyDir section of the documentation. If a Node is restarted then all pods that resided on that node will be rescheduled onto another Node. Rescheduled pods will have an empty volume whether you choose emptyDir.medium "Memory" or not.
Welcome @oculushut! |
✅ Pull request preview available for checking
To edit notification comments on pull requests, go to your Netlify site configuration. |
@oculushut Thanks you for your contribution. |
Co-authored-by: Tim Bannister <[email protected]>
…affinity rule (#1) The existing text does not make sense to me. There is no zone "V" or "R" in the example. I have changed the text to be consistent with top answer here which seems to make more sense: https://stackoverflow.com/questions/72240224/what-is-topologykey-in-pod-affinity
Don't understand the merits of this change. ... |
It is correcting the documentation:
|
I can get the second point, which IMHO is a clean fix. But I don't understand why the (anti-)affinity text should be removed. Are they incorrect? |
So, go here: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ Search for "zone=V" Now look at the example YAML just above where you find "zone=V". There is no such thing as zone V in the YAML. Similiarly, lower down there is a reference to zone R. Again, this does not exist in the above YAML. So, the textual description is discussing configurations that do not exist in the example and should be removed. At least, this is my understanding unless there is some kind of implicit zone V or zone R. |
@oculushut The so called 'zone=V' or 'zone=R' is about pod spread topology. It implies that you are running the Pod in zone 'V', or zone 'R', and you are "supposed" to have such a label on the Node objects. With this preconditions, you can combine Pod spread topology with affinity rules. So ... in my opinion, it is a complicated scenario, but the complexity worth it. If we revise the text, we will need to revise the YAML as well. That is, why we have a topology key in the YAML? |
I think must be missing something. This is the YAML that is currently published:
How would the system know that it should put the pod in V nodes and avoid R nodes based on the above configuration? V and R are mentioned in the descriptive text, but not that YAML example above. So either there is a misconfiguration in the YAML or the text is wrong. I've amended the text in my change. Is there another configuration file on that page which shows that there are V and R nodes? |
The We don't have a Node spec on this page, because we assumed users understand this concept. Instead of removing those texts, I'd suggest we make them more readable, more understandable. |
I see your point now. Perhaps something like this would make it clearer that zone V would be specified via node labels? Esp. for anybody reading this section ahead of the zone labels section. The affinity rule specifies that the scheduler is allowed to place the example Pod on a node only if that node belongs to a specific zone where other Pods have been labeled with |
@oculushut The revised text looks good to me. |
The affinity rule says that the scheduler can only schedule a Pod onto a node if | ||
the node is in the same zone (`topologyKey: topology.kubernetes.io/zone`) as one or more existing Pods with the label | ||
`security=S1`. | ||
The affinity rule specifies that the scheduler is allowed to place the example Pod on a node only if that node belongs to a specific [zone](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) where other Pods have been labeled with `security=S1`. For instance, if we have a cluster with a designated zone, let's call it "Zone V," consisting of nodes labeled with `topology.kubernetes.io/zone=V`, the scheduler can assign the Pod to any node within Zone V, as long as there is at least one Pod within Zone V already labeled with `security=S1`. Conversely, if there are no Pods with `security=S1` labels in Zone V, the scheduler will not assign the example Pod to any node in that zone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please manually wrap the long line for ease of change tracking and localization.
Please use relative links [zone](/docs/...)
without hostname.
/label tide/merge-method-squash |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tengqm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
LGTM label has been added. Git tree hash: 9025d0b61806fa3c5fbcd1a27721dd88e615a282
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
/lgtm
LGTM label has been added. Git tree hash: 3249982be65bc9df9fa2900575c672083af8a6d3
|
Minor amendment to the emptyDir documentation. I found the existing text a little confusing.