Adding or removing a cluster node by using either OpenStack or VMware

Add a node to your IBM® Cloud Private cluster, or remove a node from your cluster by using either OpenStack or VMware.

For more information about cloudctl commands, see Managing your cluster with the IBM Cloud Private CLI.

Prerequisites

Setting up your IBM Cloud Private registry

  1. Log in to the master node as a user with root permissions. The master node is usually accessible from the boot node.

  2. Install and set up the Kubernetes command-line tool, kubectl. See Install and Set Up kubectl Open in a new tab.

  3. Install the IBM Cloud Private CLI. See Installing the IBM Cloud Private CLI to get started.
    Note: You can use the IBM Cloud Private CLI to provision a new worker or proxy node only if you configured authentication between cluster nodes during IBM Cloud Private installation by using an SSH key.

  4. Log in to IBM Cloud Private to generate tokens. The command prompts you for a password, an account, and a namespace.

    cloudctl login -a https://<cluster-domain-name>:8443 -u <username> --skip-ssl-validation
    
  5. Create a Kubernetes Secret for the IBM Cloud Private Docker registry. Run the following command to log in to the registry. The command prompts you for a password.

    cloudctl cm registry-init -u <username> --server mycluster.icp:8500
    
  6. Load the images to the local registry with the following cloudctl catalog command:

    cloudctl catalog load-images --registry <cluster-domain-name>:8500 --repo-pattern 'ibmcom.*'
    

Setting up OpenStack or VMware

Setting up OpenStack

  1. Set OpenStack cloud provider credentials with the following command. The command prompts you for a password:

     cloudctl cm credentials-set-openstack -u <username> \
       --auth-url <url> \
       --domain-name <domain> \
       --tenant-name <tenant> \
       --ca-cert <path-to-pem-file>
    

    Note: If you need to download the OpenStack CA certificate for the previous step, run the following command:

     openssl s_client \
     -connect <server-url> \
     -showcerts </dev/null \
     2>/dev/null \
     | openssl x509 -outform PEM > ca.pem
    
  2. Create an OpenStack machine type. A machine type is a configuration that is used to instantiate a virtual machine.

     cloudctl cm machine-type-add-openstack --name <name> \
       --region <region> \
       --flavor-name <flavor> \
       --image-name <image> \
       --security-groups <default_group,group_1,group_2> \
       --availability-zone <zone> \
       --network <network> \
       --vm-user <user> \
       --vm-key <path-to-pem-file> \
       --key-pair <key-pair-name> \
    

Setting up VMware

  1. Set VMware cloud provider credentials. The command prompts you for a password after you run the following command:

    cloudctl cm credentials-set-vmware -u <username> --server-url <server-url> [--skip-ssl-validation]
    
  2. Create a VMware machine type with the following command. A machine type is a configuration to be used to instantiate a virtual machine:

     cloudctl cm machine-type-add-vmware --name <name> \
       --domain <domain> \
       --datacenter <datacenter>  \
       --datastore <datastore> \
       --cluster <cluster> \
       --cpus <num-cpus> \
       --memory <memory> \
       --network <network> \
       --template <template> \
       --vm-user <vm-user> \
       [--vm-password <vm-password> | --vm-key <vm-key>] \
       [--dns-servers <dns-servers>]
    

Adding or removing a proxy node

Add a proxy node to your IBM Cloud Private cluster, or remove a proxy node from your cluster by using a cloud provider.

  1. To add a proxy, run the following command with the specific options:

    cloudctl cm proxy-add --machine-type <machine-type-name> --network <network> [--ip <ip>] [--gateway <gateway>]
    
     OPTIONS:
      --machine-type value  The machine type of the node. To see available machine types, run cloudctl cm machine-types
      --network value       The name of the network or IP pool.
      --ip value            The IP the proxy node will be accessible from.
      --gateway value       Gateway for the access IP. VMware only.
      --file value          The path to a YAML file that includes values for the command. Override these values by including parameters directly to the command
    
  2. To list your proxies, run the following command with your cluster ID:

    cloudctl cm proxies
    
  3. To view details about your proxy, run the following command:

    cloudctl cm proxy-get <proxy-id>
    
  4. To remove your proxy, run the following command:

    cloudctl cm proxy-rm <proxy-id>
    

Adding or removing a worker node

Add a worker node to your IBM Cloud Private cluster, or remove a worker node from your cluster by using a cloud provider.

  1. To add a worker, run the following command:

    Note: Do not add more than three workers at a time.

     cloudctl cm worker-add --machine type <machine-type-name --num <num>
    
  2. To list your workers, run the following command:

    cloudctl cm workers
    
  3. To view details about your worker, run the following command:

    cloudctl cm worker-get <worker-id>
    
  4. To remove your worker, run the following command:

    cloudctl cm worker-rm <worker-id>