Skip to content

Add kubelet Topology Manager policy options for Bottlerocket#9144

Open
youwalther65 wants to merge 2 commits intoaws:mainfrom
youwalther65:topology-manager-policy-options
Open

Add kubelet Topology Manager policy options for Bottlerocket#9144
youwalther65 wants to merge 2 commits intoaws:mainfrom
youwalther65:topology-manager-policy-options

Conversation

@youwalther65
Copy link
Copy Markdown
Contributor

Fixes #9143

Description
In order to support latency-critical and high-throughput workloads, kubelet Topology Manager policy options prefer-closest-numa-nodes and max-allowable-numa-nodes need to be supported in Karpenter.

Bottlerocket supports settings.kubernetes.topology-manager-policy-options since v1.60.0.

Added Topology Manager policy options in pkg/providers/amifamily/bootstrap/bottlerocketsettings.go,

How was this change tested?
Created a ec2nodeclass with the a pinned, most recent Bottlerocket AMI supporting v1.60.0 like:

apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
...
spec:
spec:
  amiFamily: Bottlerocket
  amiSelectorTerms:
  - id: ami-<reducted>
...
  userData: |
    [settings.kubernetes]
    cpu-manager-policy = "static"
    cpu-manager-policy-options = ["full-pcpus-only","distribute-cpus-across-numa"]
    memory-manager-policy = "static"
    topology-manager-policy = "best-effort"

    [settings.kubernetes.topology-manager-policy-options]
    prefer-closest-numa-nodes = true
...

Run modified Karpenter controller with make run and SSM'ed into launched Bottlerocket instance to check settings:

# Check Topology Manager related settings

[ssm-user@control]$ apiclient get settings.kubernetes
{
  "settings": {
    "kubernetes": {
…
      "topology-manager-policy": "best-effort",
      "topology-manager-policy-options": {
        "prefer-closest-numa-nodes": true
      }
    }
  }
}

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@youwalther65 youwalther65 requested a review from a team as a code owner May 7, 2026 11:38
@youwalther65 youwalther65 requested a review from jigisha620 May 7, 2026 11:38
//
// [settings.kubernetes.topology-manager-policy-options]
// prefer-closest-numa-nodes = true
// max-allowable-numa-nodes = 8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: align this comment more with the rest of the file, maybe something like:

// BottlerocketTopologyManagerPolicyOptions maps to KubernetesTopologyManagerPolicyOptions in the Bottlerocket settings SDK.
// https://github.com/bottlerocket-os/bottlerocket-settings-sdk/blob/develop/bottlerocket-settings-models/modeled-types/src/kubernetes.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add kubelet Topology Manager policy options for Bottlerocket

2 participants