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.

ワーカーノードの追加

注: クラスタのアップグレード中は、ワーカーノードを追加しないでください。ただし、アップグレードが正常に完了したら、ワーカーノードを追加できます。
  1. クラスターで次のコマンドを実行します。
    CODE
    appdctl cluster add-node

    このコマンドで、クラスターにワーカーノードを追加するコマンドを生成します。

    次に、出力例を示します。

    CODE
    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. クラスタに参加させるノードで、--worker フラグを持つコマンドを実行します。

    例:

    CODE
    appdctl cluster join 10.X.X.X:25000/11c4d3d1234288c8d7135ce470aeb9e8/b3f373551c9b --worker
  3. クラスタにワーカーノードが含まれているかどうかを確認します。
    CODE
    appdctl show cluster
    microk8s status
    CODE
    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
注: クラスターにノードを追加したら、クラスターを再起動して変更を有効にします。

ワーカーノードの削除

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

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

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

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

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