Add a Kubernetes Node manually

Add a Kubernetes Node manuallyΒΆ

This section describes how to manually add a Kubernetes Node to your MCP cluster to increase the cluster capacity, for example.

To add a Kubernetes Node manually:

  1. Add a physical node using MAAS as described in the MCP Deployment Guide: Provision physical nodes using MAAS.

  2. Log in to the Salt Master node.

  3. Verify that salt-minion is running on the target node and this node appears in the list of the Salt keys:


    Example of system response:
  4. Apply the Salt states to the target node. For example, to cmp2:

    salt 'cmp2*' saltutil.refresh_pillar
    salt 'cmp2*' saltutil.sync_all
    salt 'cmp2*' state.apply salt
    salt 'cmp2*' state.apply linux,ntp,openssh,git
    salt 'cmp2*' state.sls kubernetes.pool
    salt 'cmp2*' service.restart 'kubelet'
    salt 'cmp2*' state.apply salt
    salt '*' state.apply
  5. If Virtlet will run on the target node, add the node label:

    salt -C 'I@kubernetes:master and 01' \ 'kubectl label --overwrite node cmp2 extraRuntime=virtlet'
  6. Log in to any Kubernetes Master node.

  7. Verify that the target node appears in the list of the cluster nodes and is in the Ready state:

    kubectl get nodes

    Example of system response:

    cmp0 Ready  node  54m  v1.10.3-3+93532daa6d674c
    cmp1 Ready  node  54m  v1.10.3-3+93532daa6d674c
    cmp2 Ready  node  2m   v1.10.3-3+93532daa6d674c