I have few deployments which I want to move to another kubenodes as I’m planning to decommission the existing nodes.
How can I migrate my deployment/pods on new kube nodes without affecting my application?
easy way is to scale up application which will create the pods on other nodes and then terminate the existing node and scale down application
You can mark a Node unschedulable.
Marking a node as unschedulable prevents the scheduler from placing new pods onto that Node but does not affect existing Pods on the Node. This is useful as a preparatory step before a node reboot or other maintenance.
Shwetha Shenoy V:
Mark the node as unschedulable, scale up the application. Drain the node that was cordoned. Scale down the app. You can then terminate the node that was drained.
keep in mind, if you have any pod/k8s object which is not part of the replication, then you need those application down time. Then take the backup of that objects before you do force drain of the node. Finally you can recreate it on the new server.