Who the kubelet evicts, and why

  • 12 min
  • 5 steps
  • Scheduling and nodes

Steps

0 of 5 done

Read QoS classes, trace a node-pressure eviction from the pod to the node, and contain the workload that caused it with a memory limit.

  1. Step 1 of 5

    Every workload here runs on one 1 GiB worker, kx-worker. List the pods in default with the QoS class each one was given.

    Checked against what your commands print.

  2. Step 2, not started: One cache pod has stopped and a replacement has taken its place. Find the message the kubelet recorded when it removed the first one.

  3. Step 3, not started: Find the event that shows kx-worker itself crossing its memory eviction threshold.

  4. Step 4, not started: Give the cache container a memory request and limit of 256Mi, so that its growth meets its own limit instead of starving the node.

  5. Step 5, not started: Evicted pods stay behind in phase Failed, and nothing restarts them. Delete every Failed pod in default.

Lab terminal

Cluster time 2 minutes 30 seconds
kind cluster kx, Kubernetes 1.37.
Each step is checked as you work.
​
Tab completes. Up and Down recall.
Type help for more.
Terminal keys

Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.