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.
- Prerequisites
- Setting up your registry
- Setting up OpenStack or VMware
- Adding or removing a proxy node
- Adding or removing a worker node
For more information about cloudctl
commands, see Managing your cluster with the IBM Cloud Private CLI.
Prerequisites
-
Required user type or access level: Cluster administrator
-
You need access to OpenStack or VMware for access to a virtual machine with an image that is compliant with the IBM Cloud Private worker requirements.
-
Install Python 2.7 and Docker on the image that you are using.
-
You need a username and password, or an SSH key to log in to the cloud provisioned virtual machine as a sudo user.
Setting up your IBM Cloud Private registry
-
Log in to the master node as a user with root permissions. The master node is usually accessible from the boot node.
-
Install and set up the Kubernetes command-line tool, kubectl. See Install and Set Up kubectl
.
-
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. -
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
-
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
-
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
-
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
-
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
-
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]
-
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.
-
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
-
To list your proxies, run the following command with your cluster ID:
cloudctl cm proxies
-
To view details about your proxy, run the following command:
cloudctl cm proxy-get <proxy-id>
-
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.
-
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>
-
To list your workers, run the following command:
cloudctl cm workers
-
To view details about your worker, run the following command:
cloudctl cm worker-get <worker-id>
-
To remove your worker, run the following command:
cloudctl cm worker-rm <worker-id>