Skip to content

NodeMemoryEvictionsFrequent

Severity: warning. Fires when the kubelet of one node evicted more than 10 pods for memory (kubelet_evictions{eviction_signal="memory.available"}) in the last 24 hours. On the hetzner-mgmt workers the soft memory-eviction threshold evicts a pod, most often a CI runner, before the node stalls; the replay predicts 4–9 such evictions a day across the workers. Each runner eviction raises only the info alert CIRunnerMemoryEvicted (PodEvicted); this alert says they come more often than designed, so CI jobs fail often.

Labels: node; component node. The count leaves out a kubelet's first eviction after it starts (its counter starts at 1). The alert stops once the 24-hour count drops to 10.

Read-only checks

# Which pods were evicted on the node, and for what
kubectl --context <context> get pods -A --field-selector=status.phase=Failed,spec.nodeName=<node> \
  -o custom-columns=NS:.metadata.namespace,POD:.metadata.name,MSG:.status.message | grep -i memory

# Memory now, and the requests on the node
kubectl --context <context> describe node <node> | sed -n '/Conditions:/,/Addresses:/p;/Allocated resources:/,/Events:/p'
kubectl --context <context> top pods -A --sort-by=memory | head -20

In Prometheus:

# evictions per node and signal over 24 hours
increase(kubelet_evictions[24h])
# the runner evictions, one series per pod (6 hours)
namespace_pod_node:ci_runner_memory_evicted:6h
# what the node had left
min_over_time(node_memory_MemAvailable_bytes[24h]) * on (instance) group_left (nodename) node_uname_info

Compare with the replay's expectations in hetzner-mgmt worker memory eviction: which pods were evicted and how often.

Roll forward

  • Mostly CI runner pods: two image builds on one runner pod do not fit the worker. The fix is the runner sizing in CI Runners (fewer jobs per pod, or a larger worker), or the threshold in the memory-eviction page; both are owner decisions (#2503). Raise them as an attention item with the counts; do not change the worker type or the threshold from a run.
  • Another pod: it peaks above its memory request. Raise the request as in ContainerOOMKilled, in a pull request to its component.

Roll back

The evictions started with a new version of the evicted pod's component, which uses much more memory: revert the version bump in a pull request, as in the ops runbook's generic Flux freeze roll-back. If they started with the soft-eviction patch itself, its rollback is in hetzner-mgmt worker memory eviction; that is a person's step (talosctl).