66[id="linking-node-machine-bmh_{context} "]
77= Linking the node, bare metal host, and machine together
88
9+ [role="_abstract"]
910Continue creating the new control plane node by creating a machine and then linking it with the new `BareMetalHost` object and node.
1011
1112.Procedure
1213
13- . Get the `providerID` for control plane nodes by running the following command:
14+ . Get the `providerID` for the replaced node by running the following command:
1415+
1516[source,terminal]
1617----
@@ -25,7 +26,7 @@ baremetalhost:///openshift-machine-api/master-01/58fb60bd-b2a6-4ff3-a88d-208c33a
2526baremetalhost:///openshift-machine-api/master-02/dc5a94f3-625b-43f6-ab5a-7cc4fc79f105
2627----
2728
28- . Get cluster information for labels by running the following command:
29+ . Get the ` cluster-api-cluster` label by running the following command:
2930+
3031[source,terminal]
3132----
@@ -40,10 +41,11 @@ $ oc get machine -n openshift-machine-api \
4041NAME PHASE TYPE REGION ZONE AGE CLUSTER-API-CLUSTER
4142ci-op-jcp3s7wx-ng5sd-master-0 Running 10h ci-op-jcp3s7wx-ng5sd
4243ci-op-jcp3s7wx-ng5sd-master-1 Running 10h ci-op-jcp3s7wx-ng5sd
43- ci-op-jcp3s7wx-ng5sd-master-2 Running 10h ci-op-jcp3s7wx-ng5sd
4444----
4545
46- . Create a `Machine` object for the new control plane node by creating a yaml file similar to the following:
46+ . Create a `Machine` object for the new control plane node:
47+
48+ .. Create a YAML file similar to the following:
4749+
4850[source,yaml]
4951----
@@ -75,13 +77,18 @@ spec:
7577 name: master-user-data-managed
7678----
7779+
78- --
7980 where:
8081
8182`<new_control_plane_machine>` :: Specifies the name of the new machine, which can be the same as the previously deleted machine name.
8283`<cluster_api_cluster>` :: Specifies the `CLUSTER-API-CLUSTER` value for the other control plane machines, shown in the output of the previous step.
8384`<provider_id>` :: Specifies the `providerID` value of the new bare metal host, shown in the output of an earlier step.
84- --
85+
86+ .. Apply the YAML file by running the following command:
87+ +
88+ [source,terminal]
89+ ----
90+ $ oc apply -f <machine_object_yaml_file>
91+ ----
8592+
8693 The following warning is expected:
8794+
@@ -100,6 +107,17 @@ $ NEW_NODE_NAME=<new_node_name>
100107----
101108+
102109 Replace `<new_node_name>` with the name of the new control plane node.
110+ +
111+ [NOTE]
112+ ====
113+ The name of the new node might be different than the name of the node you are replacing.
114+ You can check the name of the new node by running the following command:
115+
116+ [source,terminal]
117+ ----
118+ $ oc get nodes
119+ ----
120+ ====
103121
104122.. Define the `NEW_MACHINE_NAME` variable by running the following command:
105123+
0 commit comments