6.6.5. Creating the new control plane node


Begin creating the new control plane node by creating a BareMetalHost object and node.

Procedure

  1. Edit the bmh_affected.yaml file that you previously saved:

    1. Remove the following metadata items from the file:

      • creationTimestamp
      • generation
      • resourceVersion
      • uid
    2. Remove the status section of the file.

    The resulting file should resemble the following example:

    Example bmh_affected.yaml file

    apiVersion: metal3.io/v1alpha1
    kind: BareMetalHost
    metadata:
      labels:
        installer.openshift.io/role: control-plane
      name: openshift-control-plane-2
      namespace: openshift-machine-api
    spec:
      automatedCleaningMode: disabled
      bmc:
        address:
        credentialsName:
        disableCertificateVerification: true
      bootMACAddress: ab:cd:ef:ab:cd:ef
      bootMode: UEFI
      externallyProvisioned: true
      online: true
      rootDeviceHints:
        deviceName: /dev/disk/by-path/pci-0000:04:00.0-nvme-1
      userData:
        name: master-user-data-managed
        namespace: openshift-machine-api

  2. Create the BareMetalHost object using the bmh_affected.yaml file by running the following command:

    $ oc create -f bmh_affected.yaml

    The following warning is expected upon creation of the BareMetalHost object:

    Warning: metadata.finalizers: "baremetalhost.metal3.io": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers
  3. Extract the control plane ignition secret by running the following command:

    $ oc extract secret/master-user-data-managed \
        -n openshift-machine-api \
        --keys=userData \
        --to=- \
        | sed '/^userData/d' > new_controlplane.ign

    This command also removes the starting userData line of the ignition secret.

  4. Create an Nmstate YAML file titled new_controlplane_nmstate.yaml for the new node’s network configuration, using the following example for reference:

    Example Nmstate YAML file

    interfaces:
      - name: eno1
        type: ethernet
        state: up
        mac-address: "ab:cd:ef:01:02:03"
        ipv4:
          enabled: true
          address:
            - ip: 192.168.20.11
              prefix-length: 24
          dhcp: false
        ipv6:
          enabled: false
    dns-resolver:
      config:
        search:
          - iso.sterling.home
        server:
          - 192.168.20.8
    routes:
      config:
      - destination: 0.0.0.0/0
        metric: 100
        next-hop-address: 192.168.20.1
        next-hop-interface: eno1
        table-id: 254

    注意

    If you installed your cluster using the Agent-based Installer, you can use the failed node’s networkConfig section in the agent-config.yaml file from the original cluster deployment as a starting point for the new control plane node’s Nmstate file. For example, the following command extracts the networkConfig section for the first control plane node:

    $ cat agent-config-iso.yaml | yq .hosts[0].networkConfig > new_controlplane_nmstate.yaml
  5. Create the customized Red Hat Enterprise Linux CoreOS (RHCOS) live ISO by running the following command:

    $ coreos-installer iso customize rhcos-live.86_64.iso \
        --dest-ignition new_controlplane.ign \
        --network-nmstate new_controlplane_nmstate.yaml \
        --dest-device /dev/disk/by-path/<device_path> \
        -f

    Replace <device_path> with the path to the target device on which the ISO will be generated.

  6. Boot the new control plane node with the customized RHCOS live ISO.
  7. Approve the Certificate Signing Requests (CSR) to join the new node to the cluster.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部