我们专注服务于当下互联网基础设施建设与云计算、大数据时代的各种需求!

增加、删除node

删除node14

#ansible-playbook r.move.node14.yml -k \
-e docker_bin_dir=”/usr/bin” \
-e kube_network_plugin=”calico-rr”

#kubectl delete node node14

#kubectl get nodes node14就删除完毕

 

增加node14

在hosts.ini的nodes部分加上node别名即可,当然的提前ssh-key打通

ansible-playbook -i inventory/sk/hosts.ini scale.yml -b -k

root@node10:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
node10 Ready master 20h v1.9.5+coreos.0
node11 Ready node 3d v1.9.5+coreos.0
node12 Ready node 3d v1.9.5+coreos.0
node13 Ready node 3d v1.9.5+coreos.0
node14 Ready node 36s v1.9.5+coreos.0