Skip to content

songbinliu/podmove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

podmove

move a pod which is controlled by a ReplicationController, or ReplicaSet, or Deployment(via ReplicaSet). The older method by modifying the scheduler name cannot move a pod controlled by Deployment.

Three steps

  1. Create a clone Pod of the original Pod

The cloned pod podA has everything except the labels and podName of the original Pod. Since podA has no labels, no controller will try to adopt it.

  1. Delete the original Pod

Once the original Pod get deleted, the controller will create another new Pod podB.

  1. Update the new Pod podA by adding the labels

Once podA get the labels, the matched controller will try to adopt it. After the adoption, the number of living pods for the controller will be one more than the specified replica number, so controller will select one pod to delete. In this case, both podA ad podB is running, but podA is older than podB, so podB will get deleted.

About

move any pod to any node in Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published