1. Introduction

Out of Memory (OOM) situations can cause processes to be terminated by the Linux kernel. Kubernetes interacts with the kernel’s OOM killer through cgroups (control groups) to enforce memory limits on containers.


2. OOM Score (oom_score_adj)

Linux Kernel OOM Killer

Kubernetes & OOM Score


3. Kubernetes and Control Groups (cgroups)

What Are cgroups?

How Kubernetes Uses cgroups

When defining resource requests and limits in Kubernetes:

resources:
  requests:
    memory: "512Mi"
    cpu: "250m"
  limits:
    memory: "2Gi"
    cpu: "1"