Kubernetes日常管理手册
Kubernetes维护/删除节点
root@linux-node1:~# kubectl cordon linux-node3.example.com
- 2.检查Node状态,确认是否增加SchedulingDisabled
root@linux-node1:~# kubectl get node
NAME STATUS ROLES AGE VERSION
linux-node1.example.com Ready control-plane 2d17h v1.31.4
linux-node2.example.com Ready worker 2d17h v1.31.4
linux-node3.example.com Ready,SchedulingDisabled worker 2d17h v1.31.4
kubectl drain linux-node3.example.com --force --ignore-daemonsets
现在就可以进行节点维护、重启、升级等操作。
root@linux-node1:~# kubectl delete node linux-node3.example.com