Add Worker Nodes to the Cluster

The Virtual Appliance infrastructure services might run out of resources when handling large workloads. In these cases, adding an extra node to the cluster can help the infrastructure services to manage the increased workloads.

Add a Worker Node

Note: Do not add a worker node during the cluster upgrade. However, you can add the worker node after the upgrade is successful.
  1. Run the following command on the cluster:
    appdctl cluster add-node

    This command generates a command to add the worker node to the cluster.

    The following is a sample output:

    Enter the following command on the node as master to join the cluster:
    appdctl cluster join 10.X.X.X:25000/11c4d3d1234288c8d7135ce470aeb9e8/b3f373551c9b
    Enter the following command on the node as worker to join the cluster:
    appdctl cluster join 10.X.X.X:25000/11c4d3d1234288c8d7135ce470aeb9e8/b3f373551c9b --worker
  2. Run the command that has the --worker flag in the node that you want to join to the cluster.

    For example:

    appdctl cluster join 10.X.X.X:25000/11c4d3d1234288c8d7135ce470aeb9e8/b3f373551c9b --worker
  3. Verify whether the cluster includes the worker node:
    appdctl show cluster
    microk8s status
    NODE           | ROLE  | RUNNING
    ----------------+-------+---------
    10.0.0.1:19001 | voter | true
    10.0.0.2:19001 | voter | true
    10.0.0.3:19001 | voter | true
    10.0.0.4:19001 | voter | true
After you add a node to the cluster, restart the cluster for the changes to take effect.

ワーカーノードの削除

ワーカーノードは、不要な場合は削除できます。ワーカーノードを削除するには、次の手順を完了します。

  1. ノードで drain コマンドを実行します。
    kubectl drain <Node_Name> - -ignore-daemonsets --delete-emptydir-data

    このコマンドによって、ノードによるワークロードのスケジュールを防止します。

  2. ノードを削除します。
    kubectl delete node <Node_Name>

    このコマンドで、クラスタからワーカーノードを削除します。