Pod eviction

To keep a node stable, kubelet reserves some resources as buffers to ensure it can take actions before a node's kernel acts. There are three configurable segregations or thresholds for different purposes:

  • kube-reserved: Reserves resources for node components of Kubernetes
  • system-reserved: Reserves resources for system daemons
  • eviction-hard: A threshold for when to evict pods

Hence, a node's allocatable resources are calculated by the following equation:

Allocatable =  [Node Capacity] - <kube-reserved> - <system-reserved> - <eviction-hard>

The Kubernetes and system reservations apply on cpu, memory, and ephemeral-storage resources, and they're configured by the kubelet flags, --kube-reserved and --system-reserved, with syntax ...

Get DevOps with Kubernetes - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.