-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[AKS] Autoscale agentpool based on node-level CPU usage metrics #6690
Comments
I've filed this here as a starting point because I didn't know how to determine whether it's out of scope for the kubernetes autoscaler. I see there are some alternative node autoscalers like https://karpenter.sh with different approaches. |
I see in the FAQ that
So I suspect this feature request will be declined. The reasons seem to apply mostly to nodepool downscaling, not to upscaling. The sentence
make no sense if you're scheduling a new pod on a node which has already run out of CPU cycles. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/area cluster-autoscaler |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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-sigs/prow repository. |
Which component are you using?:
Cluster autoscaler
Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
While I can scale the number of pods for my workloads based on pod-level CPU usage, this isn't always enough. In some circumstances, even if all nodes are at 100 % CPU usage and autoscaling is enabled, no new nodes will be scheduled because the autoscaler only looks at CPU requests.
Describe the solution you'd like.:
I'd like to be able to configure limits in CPU usage for nodes in an agentpool, so that new nodes are added when the node-level CPU usage is above the limit, and new pods can be scheduled on non-breaching nodes only.
Describe any alternative solutions you've considered.:
The kubernetes descheduler could be used to remove pods from overloaded nodes (where the real node-level CPU usage as reported by the kernel to node-exporter is above, say, 95 %). To prevent the pod from being scheduled on the same node again, something else should take care of disabling scheduling on the overloaded node (the RemovePodsViolatingNodeTaints option would also be relevant). Once all nodes become unschedulable, a newly scheduled pod would trigger a request for a new node.
This is possible but sounds a bit roundabout, and the descheduler seems overkill.
Additional context.:
Cluster autoscaling, at least on AKS, only consider memory and CPU requests. When a node is under memory pressure, scheduling is disabled, pods get OOM'ed and eventually the rescheduled pods will cause a new node to be added. However, for CPU pressure this doesn't really happen, and pods may remain starved for CPU indefinitely.
Custom controllers are mentioned as one possibility. I don't want to build a full-blown operator for my assorted loads, when the problem is generic enough.
The text was updated successfully, but these errors were encountered: