skip to content
Alvin Lucillo

Pods to be terminated first

/ 1 min read

When a node will be run out of resources, either CPU or memory, the pods that will be terminated first are those that use more than they requested. By default, a pod without requests/limits is expected to consume more than they requested since k8s treats their request as 0.

You can query the pods’ requests with this command: k describe pod | grep -A 3 -E 'Requests|^Name:'

The command will show these parts in the manifest:

  1. The name of the pod (and 3 lines below it altho those are extra details unhelpful to the topic)
  2. Line that starts with Requests and the 3 lines below it