Prepare & Attach Nodes to Platform9

Command: cluster prep-node

This command prepares a node to be ready to be added to a cluster. The command does the following:

  • securely connects to a list of nodes specified
  • installs all the required pre-requisites on the nodes
  • installs Platform9 host agent and other required software on the nodes
  • authorizes the nodes to be associated with the PMK management plane

In other words, this command does everything create command does, except for creating a cluster and adding the nodes to the cluster.

This command is useful if you wish to prepare your nodes with the required pre-requisites using the CLI, but then use the PMK UI to finish cluster creation.

When you create a cluster using PMK UI, the UI recommends that you use the CLI to run this command on all the nodes you wish to add to the cluster, then come back to the UI to finish cluster creation.

Usage

Usage:

pf9ctl cluster prep-node -i NODE_IP_ADDRESS [OPTIONS]
  • -u, --user TEXT - Username for nodes. Required if you are creating a multi-node cluster, so the CLI can authenticate with each node. Refer to ‘SSH Setup for Remote Nodes’ section under [PMK CLI Overview](/kubernetes/PMK-CLI/ for more information.

  • -p, --password TEXT - Password for node. You need to specify either the password or the ssh-key if you are creating a multi-node cluster, so the CLI can authenticate with each node. Refer to ‘SSH Setup for Remote Nodes’ section under [PMK CLI Overview](/kubernetes/PMK-CLI/ for more information.

  • -s, --ssh-key TEXT - SSH private key for node. You need to specify either the password or the private ssh-key if you are creating a multi-node cluster, so the CLI can authenticate with each node. Refer to ‘SSH Setup for Remote Nodes’ section under [PMK CLI Overview](/kubernetes/PMK-CLI/ for more information.

  • -i, --ips TEXT- Required parameter. IPs of the nodes you wish to prepare with the prerequisites. You need to specify atleast one IP address for the prep-node command to work. Repeat this option multiple times to specify multiple nodes to be prepared. If you wish to also prepare the current node, specify it as ‘localhost’ or specify the current node’s IP address

  • --help- Show this message and exit.

Example

This sample command prepares the current node and 2 additional nodes with pre-requisites

pf9ctl cluster prep-node -u testuser -p testpassword -s ~/.ssh/id_rsa -i localhost -i 150.20.7.65 -i 150.20.7.66

Troubleshooting

See CLI Troubleshooting