Understanding Kubernetes v1.36's Pod-Level Resource Managers – Alpha Feature Explained
<p>Kubernetes v1.36 introduces an exciting alpha feature: <strong>Pod-Level Resource Managers</strong>. This enhancement transforms resource allocation from a per-container model to a pod-centric one, giving performance-sensitive workloads like machine learning and low-latency databases more flexibility and efficiency. By extending the kubelet's Topology, CPU, and Memory Managers to respect <code>.spec.resources</code> at the pod level, it resolves the trade-off between NUMA alignment and resource waste in pods with sidecar containers. Let's dive into the key questions surrounding this new capability.</p><h2 id="q1">What exactly are Pod-Level Resource Managers in Kubernetes v1.36?</h2><p>Pod-Level Resource Managers are an alpha feature in Kubernetes v1.36 that let the kubelet allocate resources—like CPU and memory—based on the entire pod's specification rather than just individual containers. Previously, resource managers operated strictly per container. Now, when you define <code>.spec.resources</code> in a pod, the kubelet treats that as the total budget for the pod. The Topology Manager can then perform a single NUMA alignment based on this pod-level budget, and the CPU and Memory Managers create a shared pool from the remaining resources after assigning exclusive slices to primary containers. This allows auxiliary containers (like sidecars) to share resources efficiently without sacrificing NUMA alignment for the main workload.</p><figure style="margin:20px 0"><img src="https://picsum.photos/seed/2294155896/800/450" alt="Understanding Kubernetes v1.36's Pod-Level Resource Managers – Alpha Feature Explained" style="width:100%;height:auto;border-radius:8px" loading="lazy"><figcaption style="font-size:12px;color:#666;margin-top:5px"></figcaption></figure><h2 id="q2">Why was there a need for pod-level resource allocation?</h2><p>Before this feature, running performance-critical workloads with sidecar containers posed a dilemma. To achieve NUMA-aligned, exclusive CPU resources for your main application container, you had to allocate integer-based CPUs to <em>every</em> container in the pod—including lightweight sidecars for logging, monitoring, or service meshes. This often wasted cores on containers that didn't need dedicated resources. If you opted not to do that, the pod lost its <strong>Guaranteed QoS class</strong> entirely, forfeiting performance benefits. Pod-Level Resource Managers resolve this by allowing a hybrid model: the main container gets exclusive, NUMA-aligned resources, while sidecars share a pod-level pool, ensuring both performance and efficiency.</p><h2 id="q3">How do Pod-Level Resource Managers work under the hood?</h2><p>To enable Pod-Level Resource Managers, you must activate two feature gates: <code>PodLevelResourceManagers</code> and <code>PodLevelResources</code>. Once enabled, the kubelet reads the <code>.spec.resources</code> field at the pod level to determine the overall resource budget. The Topology Manager then performs NUMA alignment based on this budget, rather than per container. The CPU and Memory Managers allocate exclusive resources to containers that request them (e.g., the main database container) and place the remaining resources into a <strong>pod shared pool</strong>. Sidecar containers can then run using resources from that pool, sharing them among themselves but remaining isolated from the node's other resources and the main container's exclusive slices. This creates a flexible, efficient allocation that maintains NUMA locality.</p><h2 id="q4">What are the real-world use cases for this feature?</h2><p>One typical scenario is a <strong>tightly-coupled database pod</strong> with a main database container, a local metrics exporter, and a backup agent. With the Topology Manager set to <code>pod</code> scope, the kubelet aligns all resources on a single NUMA node. The database container gets exclusive CPU and memory slices from that node, while the metrics exporter and backup agent share the remaining resources from the pod budget. This avoids wasting dedicated cores on sidecars while keeping the database's performance predictable. Similar benefits apply to machine learning training pods that include data ingestion sidecars, or high-frequency trading systems with monitoring containers. The feature also works with other Topology Manager scopes like <code>container</code> or <code>none</code>, offering flexibility.</p><h2 id="q5">How does the Topology Manager scope affect this feature?</h2><p>The Topology Manager's scope determines how NUMA alignment is performed. With <strong>pod scope</strong>, the kubelet does a single alignment based on the entire pod's resource budget. This is ideal when all containers in the pod should be co-located on the same NUMA node, minimizing cross-node latency. With <strong>container scope</strong> (the default), alignment is done per container—but with pod-level resources, each container can still benefit from the pod's budget. However, pod scope is where Pod-Level Resource Managers shine because it enables the shared pool concept. You can also use <strong>none scope</strong> to disable alignment. The choice depends on your workload's sensitivity to NUMA latency and the degree of isolation needed between containers.</p><h2 id="q6">Is this feature available now and how can I try it?</h2><p>Pod-Level Resource Managers are <strong>alpha</strong> in Kubernetes v1.36, meaning they are disabled by default and may change in future releases. To try it, enable the <code>PodLevelResourceManagers</code> and <code>PodLevelResources</code> feature gates on your kubelet. Then define a pod with a <code>.spec.resources</code> field specifying the total CPU and memory requests/limits. The kubelet will then manage allocations as described. Be aware that alpha features are not recommended for production clusters. You can experiment in a development environment and provide feedback to the Kubernetes community. Check the official documentation for updates as the feature progresses to beta and stable.</p>
Tags: