-
Notifications
You must be signed in to change notification settings - Fork 237
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 stacked/cooperative autoscaling or adoption of 3rd party created node claims #920
Comments
Have you thought about natively implementing your instance launch in karpenter via an implementation of the cloud provider interface? Seems like bringing your own VMS means that effectively you take the responsiblity inside of karpenter for launching/creating instances(the responsibility of the cloud provider). You can have cloudprovider.Create() wake up a hibernated instance, and cloudprovider.Delete() put it back to sleep. Link to original slack thread: https://kubernetes.slack.com/archives/C04JW2J5J5P/p1703276514443079 |
Before referring to the specific use case of our software, I have to say that I cannot confirm that this is a sufficient solution for all third party cooperative autoscalers. Even if we could "squeeze in", I believe this degree of freedom is very likely to be limiting for other use cases. As for the specifics of us as a third party: we use hibernated instances. in order for karpenter to support our use case, warm pool functionality must be implemented. edit: another example of a missing feaure is scale in protection (i.e. this instance won't be scaled in for X minutes). our current way of implementing this is delaying the transfer of responsibility to karpenter for those X minutes. |
Nodes can be opted out of consolidation disruption by setting the annotation karpenter.sh/do-not-disrupt: "true" on the node. Do you need more granular controls? Like do not disrupt until after x minutes?
https://karpenter.sh/preview/concepts/disruption/#node-level-controls |
The mechanism itself is technically sufficient and we actually plan to slightly improve our current Scale in protection implementation with it. Our concerns are: (A) We have not been able to affirm that this applies to all forms of possible downscale - drift, empty, consolidation... |
for A) In this function in the NewCandidate filter we check for the disruption annotation here. So it should cover all possible forms of automated scale down. @jonathan-innis @njtran feel free to correct any mistakes in my explanation, I think the code here speaks for itself however. |
Agree with @Bryce-Soghigian that a good way of doing this is to add the
I'd be interested to see if we can just knock-out each of the current gaps that you are identifying in Karpenter today rather than delegating Karpenter as purely a down-scaler. IMO, this breaks a lot of assumptions that we make around safety when we are walking through disrupting nodes, since we assume that we can launch replacements for these nodes and ensure that replacements are safely running and a node is fully drained before continuing on. With your current implementation with linking, how do you get around these assumptions that Karpenter makes around its ability to launch replacements? I'm assuming that Karpenter might be fighting with whichever up-scaling solution that you are using when it tries to disrupt existing nodes with pods. |
When we request karpenter to take responsibility for our nodes, we assign them to a provisioner and we would be the one at fault if they are not compatible (including from the customer's perspective). We take extreme care to verify that, inasmuch as we monitor for every karpenter configuration change and adapt our configuration to match. It works beautifully with v1alpha5: while both our scaler and karpenter start instances, once "adopted" karpenter will process those nodes successfully as it downscales them, if at all. |
Wonder if it somewhat related to #749 |
For v1 of NodePool and friends, we could aim to define the exact details of which party is responsible for what. This might be:
etc |
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 |
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 |
/lifecycle frozen |
Thank you everyone for helping out on this 🙏 Given aws/karpenter-provider-aws#6601 and this issue - what would be the best course of action here, given our desire to get our node "adopted" by a v1 Karpenter? Even a workaround would work for us for now. Things we've considered:
@bartosz-qubex FYI :) Thanks again for everyone in the thread! |
@arikkfir you could send in a PR that proposes the definition you think people will agree to, and see if it gets consensus. |
Description
What problem are you trying to solve?
(in continuation of slack conversation in #karpenter-dev on kubernetes slack)
As a 3rd party independent software vendor, I would like Karpenter to allow for cooperative autoscaling - that is, two or more autoscalers sharing responsibility for the same cluster.
While having more than one autoscaler start instances is generally benign (at most, one ends up with temporary overcapacity), more than one autoscaler trying to downscale at the same time may very well cause self-induced unavailability.
in v1alpha5, the "linking" mechanism enabled karpenter to "adopt" foreign instances and thus remain as the sole cluster downscaler. This however was incidental as this was not the original purpose of the linking mechanism, perhaps now a proper feature aimed at this goal can be designed.
In lieu of cooperative autoscaling, we have observed 3rd party vendors requiring customers to migrate off of karpenter (or cluster autoscaler for that matter), which (at least in our scenario as a specialized autoscaler) is undesirable.
as a 3rd party vendor, we plan on assuming all integration responsibility upon ourselves, but the most basic supporting mechanism (e.g. not rejecting foreign nodeclaims) should hopefully exist.
How important is this feature to you?
This is very important to us as we would like to continue supporting cooperative autoscaling from v1beta1 onwards.
The text was updated successfully, but these errors were encountered: