Skip to content

Commit

Permalink
Merge pull request kubernetes#6567 from kubernetes/towca-patch-2
Browse files Browse the repository at this point in the history
CA FAQ: clarify the point about scheduling constraints blocking scale-down
  • Loading branch information
k8s-ci-robot authored Feb 27, 2024
2 parents 0c62f54 + 2cd8e16 commit 5232e53
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cluster-autoscaler/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,13 @@ Cluster Autoscaler decreases the size of the cluster when some nodes are consist
"cluster-autoscaler.kubernetes.io/safe-to-evict-local-volumes": "volume-1,volume-2,.."
```
and all of the pod's local volumes are listed in the annotation value.
* Pods that cannot be moved elsewhere due to various constraints (lack of resources, non-matching node selectors or affinity,
matching anti-affinity, etc)
* Pods that cannot be moved elsewhere due to scheduling constraints. CA simulates kube-scheduler behavior, and if there's no other node where a given pod can schedule, the pod's node won't be scaled down.
* This can be particularly visible if a given workloads' pods are configured to only fit one pod per node on some subset of nodes. Such pods will always block CA from scaling down their nodes, because all
other valid nodes are either taken by another pod, or empty (and CA prefers scaling down empty nodes).
* Examples of scenarios where scheduling constraints prevent CA from deleting a node:
* No other node has enough resources to satisfy a pod's request
* No other node has available ports to satisfy a pod's `hostPort` configuration.
* No other node with enough resources has the labels required by a pod's node selector
* Pods that have the following annotation set:
```
"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
Expand Down

0 comments on commit 5232e53

Please sign in to comment.