-
Notifications
You must be signed in to change notification settings - Fork 317
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 for topology spread constraints with cluster autoscaler #2849
Comments
Hi martin-adema, AKS bot here 👋 I might be just a bot, but I'm told my suggestions are normally quite good, as such:
|
Triage required from @Azure/aks-pm |
Action required from @Azure/aks-pm |
Issue needing attention of @Azure/aks-leads |
10 similar comments
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
@justindavies could you help take a look? |
Hi my customer has the same issue using PodAntiaffinity and the CA never triggering when pods cannot be scheduled. To be sure, is it linked to this issue ? |
Action required from @Azure/aks-pm |
Issue needing attention of @Azure/aks-leads |
7 similar comments
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
Issue needing attention of @Azure/aks-leads |
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment. |
Issue needing attention of @Azure/aks-leads |
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment. |
Hi, requesting the same feature.
|
Hello, we are suffering from a "thundering herd" problem. We were looking to use topology spread constraints to partially mitigate it, but found that the autoscaler does not work when they're applied, despite the fact that the unscheduleable pods metric was significantly greater than 0 |
@mmisztal1980 - Ack and apologies for the delay. As a best practice we generally advice using three nodepools, one for each zone while using cluster autoscaler with multiple zones. If this setup doesn't work, please file a new support ticket and update it here and we will investigate further, especially since you are running also a newer version of Cluster Autoscaler. |
Hi @kevinkrp93 , thanks for the response. Before we apply your suggestion, we're more interested in understanding why the autoscaler does not react to the Pending pods which are the result of topology spread constraints in |
@mmisztal1980 - Autoscaler does not make zone based scale-out calls. Zone balancing is taken care by the compute provider, so if autoscaler thinks it can't fit the pod on a node autoscaler will not issue a scale-out call to compute. Also autoscaler treats all the nodes in the nodepool equally (and uses the nodepool template to scale up). Hence we advise one zone per nodepool when using cluster autoscaler with AZs. |
This issue has been automatically marked as stale because it has not had any activity for 21 days. It will be closed if no further activity occurs within 7 days of this comment. |
This issue will now be closed because it hasn't had any activity for 7 days after stale. martin-adema feel free to comment again on the next 7 days to reopen or open a new issue after that time if you still have a question/issue or suggestion. |
When a deployment is applied using topology spread constraints with a maxSkew of 1 and topology key "topology.kubernetes.io/zone" the cluster autoscaler scales up 1 zone with too many nodes and after the scale-down-unneeded-time has passed they will be removed again.
There is a nodepool for each zone (3) and balance-similar-node-groups is set to true.
I would expect nodes to be added to each zone with the similar number of nodes and not unneeded nodes extra being added which are removed again the after scale-down-unneeded-time timeout.
The issue can be reproduced by applying a deployment with resource requests sized about half the size of the nodes, about 30 pods and with topology spread constraints configured:
topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: DoNotSchedule
Cluster setup with autoscaled nodepools per zone and with balance-similar-node-groups set to true..
MS support ticket 2112070050001650 was opened for this issue. Was told there is no special integration between pod topology spreading and CA as in this this behavior is expected. Advised to open issue and request for integration of topology spread constraints.
Kubernetes 1.21.9
1 system nodepool (Standard_D16as_v4) with 3 nodes (no autoscaling)
3 user nodepools (1 per zone, Standard_D16as_v4) and cluster autoscaling (3 - 30)
The text was updated successfully, but these errors were encountered: