Taints with Noexecute effect: Two pods running on node, one with toleration an . . .

Anusha:
Taints with Noexecute effect:

Two pods running on node, one with toleration and other with no tolerance.
If I taint node with Noexecute effect, the pod1 with toleration will just stop running, but the the pod2 without tolerance will get KILLED or SCHEDULED on other nodes??

Please share your thoughts?

Santosh Kaluskar:
Taints with NoExecute will evict the Pods which do not tolerate the taint. But, will not affect Pods with toleration, unless tolerationSeconds is mentioned in the toleration sepc. In such cases, It will run for the time specified.
More on that https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-based-evictions|here

Santosh Kaluskar:
And, incase the Pods are managed by Deployment, StatefulSet, kube-controller-manager creates new pods in place of the evicted pods by scheduling the to appropriate node.

Anusha:
Thank you @Santosh Kaluskar…
I am actually looking for this setup…making them scheduled automatically on other nodes.

I got question like: make the node unschedulable and make sure the pods are running on other nodes.

Santosh Kaluskar:
Try with Deployment replica 1, check the node alloted to the pod, drain the node, or apply the taint with NoExecute, confirm the pod deployed on a different node. If its a standalone Pod, it will be terminated and not recreated.