Karpenter will occassionally provision nodes that are way too large #1762
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
Note that I am cross-posting this from aws/karpenter-provider-aws#7254 as the more I look into the issue, the more it seems to be related to core Karpenter logic rather than something on AWS's end.
Observed Behavior:
Occasionally, Karpenter will provision a node that is far, far above what is being requested.
For example, notice the provisioned node below is 10x larger than what is being requested. Moreover, the generated nodeclaim only has a single entry for
instance-types
.That is despite the NodePool (manifest below) having many, many instances types that would fit the scheduling request (which it normally does).
Expected Behavior:
When a set of pods is pending and needs a new node, the generated node claim includes all applicable
instance-types
and an appropriately sized node is created.This normally works correctly and generates logs as follows:
Reproduction Steps (Please include YAML):
It is unclear to me how to reproduce. I have tried all the obvious things and am not able to reliability re-trigger the behavior (it seems to occur somewhat randomly):
I have also verified that the pods do not have any scheduling constraints that would limit them to a single instance type.
In fact, which particular type is chosen for
instance-types
seems somewhat random. Sometimes it is appropriately sized, sometimes it is 10x too large, sometimes it is 100x too large. The instance families also differ. However, what is consistent is the the node claim is (a) created by theprovisioner
controller and (b) gets generated with just a single type rather than the full expected set.After the node is created, Karpenter will then usually disrupt it shortly after and replace it with a smaller node. However, we have sometimes had PDBs prevent this which is when we noticed that this behavior was occurring.
Additionally, all of the NodePools where we have observed this behavior allow spot instances, but I do not know if that is relevant (all of our NodePools are spot-enabled).
Finally, we only started noticing this issue after upgrading to Karpenter v1 or at least it seems far more prevalent now.
Versions:
1.0.1
kubectl version
):v1.29.8-eks-a737599
The text was updated successfully, but these errors were encountered: