Convert Worker NodesΒΆ

About this task

In a hybrid (Kubernetes and OpenStack) cluster scenario you may need to convert worker nodes to/from openstack-compute-nodes.

Procedure

  1. Convert a k8s-only worker into a OpenStack compute

    1. Lock the worker host:

      system host-lock <host>
      
    2. Add the openstack-compute-node taint.

      kubectl taint nodes <kubernetes-node-name> openstack-compute-node:NoSchedule
      
    3. Assign OpenStack labels:

      system host-label-assign <host> --overwrite openstack-compute-node=enabled avs=enabled sriov=enabled
      
    4. Allocate vswitch huge pages:

      system host-memory-modify -1G 1 -f vswitch <host> 0
      system host-memory-modify -1G 1 -f vswitch <host> 1
      
    5. Change the class of the data network interface:

      system host-if-modify -c data <host> <if_name_or_uuid>
      

      Note

      If data network interface does not exist yet, refer to StarlingX OpenStack documentation on creating it.

    6. Change Kubernetes CPU Manager Policy to allow VMs to use application cores:

      system host-label-remove <host> kube-cpu-mgr-policy
      
    7. Unlock the worker host:

      system host-unlock <host>
      
  2. Convert a OpenStack compute into a k8s-only worker.

    1. Lock the worker host:

      system host-lock <host>
      
    2. Remove OpenStack labels:

      system host-label-remove <host> openstack-compute-node avs sriov
      

      Note

      The labels have to be removed, not to have its values changed.

    3. Deallocate vswitch huge pages:

      system host-memory-modify -1G 0 -f vswitch <host> 0
      system host-memory-modify -1G 0 -f vswitch <host> 1
      
    4. Change the class of the data network interface:

      system host-if-modify -c none <host> <if_name_or_uuid>
      

      Note

      This change is needed to avoid raising a permanent alarm for the interface without the need to delete it.

    5. Unlock the worker host:

      system host-unlock <host>