8.4.2. 置备裸机节点
置备裸机节点需要从 provisioner 节点执行以下步骤。
流程
在置备裸机节点前,请确保
PROVISIONING STATUS
为ready
。$ oc -n openshift-machine-api get bmh openshift-worker-<num>
其中
<num>
是 worker 节点号。NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR openshift-worker-<num> OK ready ipmi://<out-of-band-ip> unknown true
获取 worker 节点数量。
$ oc get nodes
NAME STATUS ROLES AGE VERSION provisioner.openshift.example.com Ready master 30h v1.16.2 openshift-master-1.openshift.example.com Ready master 30h v1.16.2 openshift-master-2.openshift.example.com Ready master 30h v1.16.2 openshift-master-3.openshift.example.com Ready master 30h v1.16.2 openshift-worker-0.openshift.example.com Ready master 30h v1.16.2 openshift-worker-1.openshift.example.com Ready master 30h v1.16.2
获取机器集。
$ oc get machinesets -n openshift-machine-api
NAME DESIRED CURRENT READY AVAILABLE AGE ... openshift-worker-0.example.com 1 1 1 1 55m openshift-worker-1.example.com 1 1 1 1 55m
将 worker 节点数量增加一倍。
$ oc scale --replicas=<num> machineset <machineset> -n openshift-machine-api
将
<num>
替换为新的 worker 节点数。将<machineset>
替换为上一步中的机器集的名称。检查裸机节点的状态。
$ oc -n openshift-machine-api get bmh openshift-worker-<num>
其中
<num>
是 worker 节点号。状态从ready
变为provisioning
。NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR openshift-worker-<num> OK provisioning openshift-worker-<num>-65tjz ipmi://<out-of-band-ip> unknown true
provisioning
会一直保持,直到 OpenShift Container Platform 集群置备节点。这可能需要 30 分钟或更长时间。完成后,状态将变为provisioned
。NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR openshift-worker-<num> OK provisioned openshift-worker-<num>-65tjz ipmi://<out-of-band-ip> unknown true
置备后,请确保裸机节点就绪。
$ oc get nodes
NAME STATUS ROLES AGE VERSION provisioner.openshift.example.com Ready master 30h v1.16.2 openshift-master-1.openshift.example.com Ready master 30h v1.16.2 openshift-master-2.openshift.example.com Ready master 30h v1.16.2 openshift-master-3.openshift.example.com Ready master 30h v1.16.2 openshift-worker-0.openshift.example.com Ready master 30h v1.16.2 openshift-worker-1.openshift.example.com Ready master 30h v1.16.2 openshift-worker-<num>.openshift.example.com Ready worker 3m27s v1.16.2
您还可以检查 kubelet。
$ ssh openshift-worker-<num>
[kni@openshift-worker-<num>]$ journalctl -fu kubelet