Skip to content

Latest commit

 

History

History
110 lines (98 loc) · 3.13 KB

adding-node-iso-yaml.adoc

File metadata and controls

110 lines (98 loc) · 3.13 KB

Adding one or more nodes using a configuration file

You can add one or more nodes to your cluster by using the nodes-config.yaml file to specify configurations for the new nodes.

Prerequisites
  • You have installed the OpenShift CLI (oc)

  • You have an active connection to your target cluster

  • You have a kubeconfig file available

Procedure
  1. Create a new YAML file that contains configurations for the nodes you are adding and is named nodes-config.yaml. You must provide a MAC address for each new node.

    In the following example file, two new workers are described with an initial static network configuration:

    Example nodes-config.yaml file
    hosts:
    - hostname: extra-worker-1
      rootDeviceHints:
       deviceName: /dev/sda
      interfaces:
       - macAddress: 00:00:00:00:00:00
         name: eth0
      networkConfig:
       interfaces:
         - name: eth0
           type: ethernet
           state: up
           mac-address: 00:00:00:00:00:00
           ipv4:
             enabled: true
             address:
               - ip: 192.168.122.2
                 prefix-length: 23
             dhcp: false
    - hostname: extra-worker-2
      rootDeviceHints:
       deviceName: /dev/sda
      interfaces:
       - macAddress: 00:00:00:00:00:02
         name: eth0
      networkConfig:
       interfaces:
         - name: eth0
           type: ethernet
           state: up
           mac-address: 00:00:00:00:00:02
           ipv4:
             enabled: true
             address:
               - ip: 192.168.122.3
                 prefix-length: 23
             dhcp: false
  2. Generate the ISO image by running the following command:

    $ oc adm node-image create nodes-config.yaml
    Important

    In order for the create command to fetch a release image that matches the target cluster version, you must specify a valid pull secret. You can specify the pull secret either by using the --registry-config flag or by setting the REGISTRY_AUTH_FILE environment variable beforehand.

    Note

    If the directory of the nodes-config.yaml file is not specified by using the --dir flag, the tool looks for the file in the current directory.

  3. Verify that a new node.<arch>.iso file is present in the asset directory. The asset directory is your current directory, unless you specified a different one when creating the ISO image.

  4. Boot the selected node with the generated ISO image.

  5. Track progress of the node creation by running the following command:

    $ oc adm node-image monitor --ip-addresses <ip_addresses>

    where:

    <ip_addresses>

    Specifies a list of the IP addresses of the nodes that are being added.

    Note

    If reverse DNS entries are not available for your node, the oc adm node-image monitor command skips checks for pending certificate signing requests (CSRs). If these checks are skipped, you must manually check for CSRs by running the oc get csr command.

  6. Approve the CSRs by running the following command for each CSR:

    $ oc adm certificate approve <csr_name>