3.17. HostFirmwareComponents 리소스 편집
노드의 HostFirmwareComponents 리소스를 편집할 수 있습니다.
프로세스
HostFirmwareComponents리소스의 자세한 목록을 가져옵니다.$ oc get hostfirmwarecomponents -n openshift-machine-api -o yaml호스트의
HostFirmwareComponents리소스를 편집합니다.$ oc edit <host_name> hostfirmwarecomponents -n openshift-machine-api1 - 1
- 여기서
<host_name>은 호스트의 이름입니다.HostFirmwareComponents리소스가 터미널의 기본 편집기에서 열립니다.
출력 예
--- apiVersion: metal3.io/v1alpha1 kind: HostFirmwareComponents metadata: creationTimestamp: 2024-04-25T20:32:06Z" generation: 1 name: ostest-master-2 namespace: openshift-machine-api ownerReferences: - apiVersion: metal3.io/v1alpha1 blockOwnerDeletion: true controller: true kind: BareMetalHost name: ostest-master-2 uid: 16022566-7850-4dc8-9e7d-f216211d4195 resourceVersion: "2437" uid: 2038d63f-afc0-4413-8ffe-2f8e098d1f6c spec: updates: - name: bios1 url: https://myurl.with.firmware.for.bios2 - name: bmc3 url: https://myurl.with.firmware.for.bmc4 status: components: - component: bios currentVersion: 1.0.0 initialVersion: 1.0.0 - component: bmc currentVersion: "1.00" initialVersion: "1.00" conditions: - lastTransitionTime: "2024-04-25T20:32:06Z" message: "" observedGeneration: 1 reason: OK status: "True" type: Valid - lastTransitionTime: "2024-04-25T20:32:06Z" message: "" observedGeneration: 1 reason: OK status: "False" type: ChangeDetected lastUpdated: "2024-04-25T20:32:06Z"- 변경 사항을 저장하고 편집기를 종료합니다.
호스트의 시스템 이름을 가져옵니다.
$ oc get bmh <host_name> -n openshift-machine name1 - 1
- 여기서
<host_name>은 호스트의 이름입니다. 시스템 이름은CONSUMER필드에 표시됩니다.
머신 세트에서 삭제하려면 머신에 주석을 답니다.
$ oc annotate machine <machine_name> machine.openshift.io/delete-machine=true -n openshift-machine-api1 - 1
- 여기서
<machine_name>은 삭제할 머신의 이름입니다.
노드 목록을 가져오고 작업자 노드 수를 계산합니다.
$ oc get nodes머신 세트를 가져옵니다.
$ oc get machinesets -n openshift-machine-api머신 세트를 스케일링합니다.
$ oc scale machineset <machineset_name> -n openshift-machine-api --replicas=<n-1>1 - 1
- 여기서
<machineset_name>은 머신 세트의 이름이며 <n-1>은 감소된 작업자 노드 수입니다.
호스트가
Available상태가 되면HostFirmwareComponents리소스 변경 사항이 적용되도록 시스템 세트를 확장합니다.$ oc scale machineset <machineset_name> -n openshift-machine-api --replicas=<n>1 - 1
- 여기서
<machineset_name>은 머신 세트의 이름이며 <n>은 작업자 노드 수입니다.