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 cpumemory, 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.