OpsCanary
kubernetesPractitioner

Mastering Memory QoS in Kubernetes v1.36: Tiered Memory Protection Explained

5 min read Kubernetes BlogApr 29, 2026Reviewed for accuracy
Share
PractitionerHands-on experience recommended

Memory QoS exists to address the challenges of memory management in Kubernetes. As applications scale, ensuring that critical workloads have guaranteed memory while allowing for flexibility in less critical ones becomes essential. Memory QoS achieves this by using the cgroup v2 memory controller, allowing you to specify hard and soft memory protections for your pods.

At its core, Memory QoS utilizes four key interfaces: memory.max for hard limits, memory.min for guaranteed protection (only for Guaranteed Pods), memory.low for soft protection (for Burstable Pods), and memory.high for throttling. The kubelet plays a crucial role by maintaining memory.min across the kubepods root cgroup and memory.low for Burstable QoS cgroups. You can configure Memory QoS through the kubelet configuration, enabling it with featureGates.MemoryQoS and specifying the memoryReservationPolicy to control how memory is reserved.

In production, understanding how to set these parameters effectively is key. Ensure your Kubernetes version is v1.36 or later, and ideally, use a kernel version of 5.9 or higher to avoid known issues like the kernel livelock. The Memory QoS feature is still in alpha, so be prepared for potential changes and ensure thorough testing before rolling it out to critical environments.

Key takeaways

  • Enable Memory QoS by setting featureGates.MemoryQoS to true in your kubelet configuration.
  • Use memory.min for Guaranteed Pods to ensure hard memory protection.
  • Implement memory.low for Burstable Pods to provide soft memory protection.
  • Monitor memory metrics using the command: curl -sk https://localhost:10250/metrics | grep memory_qos.
  • Be aware of kernel compatibility; use kernel 5.9 or higher to avoid livelock issues.

Why it matters

In production, Memory QoS can significantly improve resource allocation, ensuring critical applications remain responsive while optimizing overall cluster performance. This leads to better resource utilization and cost efficiency.

Code examples

YAML
1apiVersion: kubelet.config.k8s.io/v1beta1
2kind: KubeletConfiguration
3featureGates:
4  MemoryQoS: true
5memoryReservationPolicy: TieredReservation  # Options: None (default), TieredReservation
6memoryThrottlingFactor: 0.9  # Optional: default is 0.9
YAML
1apiVersion: kubelet.config.k8s.io/v1beta1
2kind: KubeletConfiguration
3featureGates:
4  MemoryQoS: true
5memoryReservationPolicy: None
6# This is the default
Bash
$ curl -sk https://localhost:10250/metrics | grep memory_qos

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Better StackSponsor

Unified observability — logs, uptime monitoring, and on-call in one place. Used by 50,000+ engineering teams to ship faster and sleep better.

Try Better Stack free →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.