Skip to content

Karpenter underprovisions CPU requests for DS with certain node affinity #2116

Open
@jeremysprofile

Description

@jeremysprofile

Description

Observed Behavior:

Karpenter provisions a Node with too little allocatable CPU for the Pod and DS it needs to schedule.

Expected Behavior:

Karpenter accurately takes into account all DS that will end up being scheduled on the Node it will create.

Reproduction Steps (Please include YAML):

Create a NodePool, DaemonSet, and Deployment by kubectl apply -f on the files in the comment below.
See that Karpenter logs a too-low CPU request value and provisions a Node that cannot hold the Deployment and DaemonSet together, and either the Pod of the Deployment or the Daemonset will be stuck Pending.
(If the Deployment is stuck Pending, Karpenter will provision another new too-small Node and repeat. If the DaemonSet is stuck Pending, you'll only have one Node.)

See the Karpenter logs in the comment below.

If you remove the

              - key: karpenter.sh/registered
                operator: In
                values:
                - "true"

from the DaemonSet affinity, Karpenter will accurately take into account the DaemonSet resources and provision a large enough Node.

This seems similar to (but the reverse of) #715

Versions:

  • Chart Version: v0.32.10 (yes, we're very behind)
  • Kubernetes Version (kubectl version): 1.31
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions