'Kubernetes Pods Not Being Evicted

I have multiple pods on Kubernetes (v1.23.5) that are not being evicted and rescheduled in case of node failure.

According to Kubernetes documentation, this process must begin after 300s:

Kubernetes automatically adds a Toleration for node.kubernetes.io/not-ready and node.kubernetes.io/unreachable with tolerationSeconds=300, unless you, or a controller, set those tolerations explicitly. These automatically-added tolerations mean that Pods remain bound to Nodes for 5 minutes after one of these problems is detected.

Unfortunately, pods get stuck in terminating status and would not evict. However, in one test on a pod without any PVC attached, it evicted and started running on another node.

  • I'm trying to understand how I can make other pods evict after the default 300s time.
  • I don't know why it would not happen automatically and I must drain the pod stuck in a terminating state to make it work properly.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source