Home > Software engineering >  How to move a pod from one node to another in kubernetes
How to move a pod from one node to another in kubernetes

Time:01-26

I have a pod P1 that located in Node N1. I need to move that to another Node N2. What are the different ways to do this other than node selector?

nodeSelector: name: N1

CodePudding user response:

First of all you cannot “move” a pod from one node to another. You can only delete it from one node and have it re-created on another. To delete use the kubectl delete command. To ensure a pod lands on a specific node using node affinity/taints and tolerations. Hope that helps.

please see this Answer

CodePudding user response:

As the previous answer mentioned, you cannot move pods but you can configure them to come up on specific nodes.

See official docs on assigning pods to nodes, taints and tolerations and Pod Topology Spread Constraints

  • Related