Kubernetes v1.36 introduces a significant alpha feature: Pod-Level Resource Managers. This enhancement transforms how resource allocation works for performance-sensitive workloads, moving from a per-container model to a pod-centric approach. Here we answer common questions about this new capability, explaining its benefits, use cases, and configuration details.
1. What are Pod-Level Resource Managers in Kubernetes v1.36?
Pod-Level Resource Managers are an alpha feature in Kubernetes v1.36 that extend the kubelet's existing Topology, CPU, and Memory Managers. Instead of allocating resources strictly per container, they now support pod-level resource specifications defined under .spec.resources. This allows the kubelet to create hybrid allocation models where a pod's overall resource budget is set, and then resources can be partitioned between the main application container and lightweight sidecars. The feature is gated by the PodLevelResourceManagers and PodLevelResources feature flags.
2. Why were Pod-Level Resource Managers developed?
Before this feature, running performance-critical workloads like ML training or low-latency databases with sidecar containers (logging, monitoring) presented a trade-off. To get NUMA-aligned, exclusive resources for the main container, you had to allocate integer CPU resources to every container in the pod—even lightweight sidecars—which was wasteful. If you didn't, you lost the pod's Guaranteed QoS class and performance benefits. Pod-Level Resource Managers solve this by allowing a shared pool for sidecars while preserving exclusive, NUMA-aligned resources for critical containers. This brings flexibility and efficiency without sacrificing performance.
3. How do Pod-Level Resource Managers improve resource allocation?
The feature enables a two-tier resource model. First, the pod declares a total resource budget (requests and limits for CPU and memory). The kubelet then performs a single NUMA alignment based on that budget. Inside the pod, the main container can be assigned exclusive CPU and memory slices from that NUMA node. The remaining resources become a pod shared pool, used by sidecar containers. Sidecars share resources with each other but are strictly isolated from the main container and the rest of the node. This avoids wasting dedicated cores on auxiliary tasks while maintaining strict NUMA alignment for the primary workload.
4. What are the key use cases for Pod-Level Resource Managers?
One prominent use case is a latency-sensitive database pod with multiple sidecars. As described in the Kubernetes documentation, consider a pod with a main database container, a metrics exporter, and a backup agent. With the Topology Manager configured to pod scope, the kubelet aligns resources for the entire pod on a single NUMA node. The database gets exclusive CPU and memory slices, while the metrics exporter and backup agent run in the pod's shared pool. This allows safe co-location of auxiliary containers on the same NUMA node without dedicating cores to them. Other use cases include high-frequency trading, real-time analytics, or any workload where sidecars are necessary but should not interfere with performance-critical processes.
5. How do you enable Pod-Level Resource Managers?
To use this alpha feature, you must enable two feature gates on the kubelet: PodLevelResourceManagers and PodLevelResources. This can be done by setting the --feature-gates flag, for example: --feature-gates=PodLevelResourceManagers=true,PodLevelResources=true. Additionally, the Topology Manager must be configured appropriately (e.g., with a pod scope). Since this is alpha, it is not enabled by default and may have limited support in production clusters. As with any alpha feature, test thoroughly in non-production environments before adopting.
6. Can you show an example of a Pod configuration using this feature?
Yes. Below is an example YAML for a tightly-coupled database pod (based on the use case above):
apiVersion: v1
kind: Pod
metadata:
name: tightly-coupled-database
spec:
resources:
requests:
cpu: "8"
memory: "16Gi"
limits:
cpu: "8"
memory: "16Gi"
initContainers:
- name: metrics-exporter
image: metrics-exporter:v1
restartPolicy: Always
- name: backup-agent
image: backup-agent:v1
restartPolicy: Always
containers:
- name: database
image: my-database:latest
resources:
requests:
cpu: "6"
memory: "12Gi"
limits:
cpu: "6"
memory: "12Gi"
In this configuration, the pod's total budget is 8 CPUs and 16Gi memory. The database container requests 6 CPUs and 12Gi exclusively. The remaining 2 CPUs and 4Gi form the shared pool for the init containers (sidecars). The Topology Manager ensures all resources come from the same NUMA node.