This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.10.4.3. 在 CLI 中将节点设置为维护模式
通过创建 NodeMaintenance
自定义资源 (CR) 对象来将节点设置为维护模式,该对象需引用节点名称以及将节点设置为维护模式的原因。
流程
创建节点维护模式的 CR 配置。本例使用名为
node02-maintenance.yaml
的 CR:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在集群中创建
NodeMaintenance
对象:oc apply -f <node02-maintenance.yaml>
$ oc apply -f <node02-maintenance.yaml>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
该节点会实时迁移具有 LiveMigration
驱除策略的虚拟机实例,并污染该节点,使其不可再调度。该节点上的所有其他 pod 和虚拟机均被删除,并会在另一节点上重新创建。