CLI Overview
The Platform9 CLI pf9ctl
provides an easy way to create and manage your BareOS Kubernetes clusters. The CLI lets you automate all aspects of the creation of highly available multi-master Kubernetes clusters using physical or virtual machines.
Using the CLI you can:
- Use it to prepare your machines and connect them to Platform9:
pf9ctl cluster prep-node
- Create a single node cluster for testing:
pf9ctl cluster bootstrap
- Add nodes one by one into a cluster:
pf9ctl cluster create
Advanced CLI Options
- Create multi-node clusters
- Attach nodes that are already prepared to an existing cluster
- Download and install the CLI on a Ubuntu Node and use the CLI for Remote Installation Over SSH
Not Seeing Any Nodes?
Use the CLI to Build a Cluster using the Platform9 Management Plane
To build a BareOS cluster from the Platform9 Management plane nodes must be connected and available. If no nodes are available, use the CLI prep-node
command to complete the prerequisites and connect the node to Platform9.
Building a BareOS cluster requires that nodes be attached to Platform9 by executing the Platform9 CLI on each node: ‘pf9ctl cluster prep-node
.

Below are the steps to attach nodes to Platform9:
Image: BareOS Cluster Wizard with no Nodes Available

Use the CLI to Prep Nodes
To be able to create a cluster using the platform9 Management Plane each node must first be connected using the Platform9 CLI. The CLI is first installed, then used in the prep-node
mode to install all prerequisites a then connect the node to Platform9.
Follow the steps below to use the PF9 CLI to connect nodes to the Platform9 Management Plane
1. Download and install the CLI on each node of the Kubernetes cluster
bash <(curl -sL http://pf9.io/get_cli)
2. When the installer starts enter your management plane URL and credentials.
- Example https://pmkft-managementplane.platform9.horse
- Enter your username and password
3. When the installation is complete, run the PF9 CLI using ‘prep-node’ to attach the Node to the Platform9 Management plane
pf9ctl cluster prep-node
4. Onceprep-node
has been completed on each node return to the Platform9 Management
Plane and complete the BareOS Create a Cluster Wizard to build your
Kubernetes Cluster
Image: BareOS Cluster Wizard with Nodes Available**

CLI Hints
- See Add/Remove for instructions on installing/updating/removing the CLI
- See SSH Mode for instructions on how to use the CLI from remote servers to build clusters