-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support PodAntiAffinity #1010
Comments
Closing in favor of #942. Can you post your question there? |
If you use hostname topology with max skew of one, you will only get one pod per node. edit: Thinking further, in single node cluster, the kube scheduler will place all pods on that node if there is room, since provisioning isn't part of the decision making. I think this convinces me that we need antiaffinity support and my previous statements about topology being an abject replacement do not hold in all use cases. |
@ellistarn So let's say if I have only one node with label That's why I asked Currently it is impossible to place one pod per node with Karpenter when we use So please consider support for |
Tell us about your request
As you know k8s has great
podAntiAffinity
mechanism that allows us to place the same pods on different nodes.As example:
At the same time
Karpenter
doesn't support bothpodAffinity
andpodAntiAffinity
We can use
topologySpreadConstraints
instead but it hasmaxSkew
1 as minimum value.It means that two same pods can be placed on the same node.
So how can we tell
Karpenter
to create a new node for each specific pod instead of trying to place them to an existing node if it still has capacity?I know that I can use
to let pod acquire all resources on a node but if I do this all other pods (from other deploy/sts) won't be able to be placed on the node if they satisfy requirements.
Can you please tell me if there is a workaround?
Community Note
The text was updated successfully, but these errors were encountered: