CLI Overview

To create an on-premises BareOS Kubernetes cluster using PMK, each of your on-premises nodes must first be prepared with the required software packages and connected to the Platform9 management plane. This is achieved using the Platform9 CLI.

The Platform9 CLI can be downloaded and run on any compatible linux system, such as a VM on a laptop or desktop, a linux physical machine, or a virtual machine in your VMware or other IaaS environment in your data center.

Using the CLI you can:

  • Check if a node has the required OS and networking pre-requisites configured and is ready to be used as a Kubernetes node: pf9ctl check-node
  • Prepare your node with required software packages and connect it to your PMK management plane, so that you can add it to a PMK cluster: pf9ctl prep-node. NOTE - This command can be used to prepare the current node the CLI is running on as well as other remote nodes assuming the node that the CLI is running on can establish an ssh connection to those nodes.

Starting March 2021, Platform9 has replaced the existing CLI written in Python with a new GO based CLI. This change has removed Create Cluster, Attach Node and Bootstrap commands from the CLI. The functionality will be restored in future releases of the CLI.

Use the CLI to Prepare Your Nodes

Below are the steps to use the CLI to prepare your nodes so that the PMK management plane discovers them.

Step 1: Download and install the CLI on each node

Run the following command on at least one of your nodes to install the Platform9 CLI on it.

Bash
Copy

Step 2: Configure the CLI

Once the CLI is installed, run the following command to configure the CLI to connect to your PMK SaaS Management Plane.

Bash
Copy

The command will ask you for the following parameters:

  • Platform9 Account URL - Enter your PMK SaaS Management Plane URL
  • Username - Enter your PMK username
  • Password - Enter your PMK password
  • Enter the region: (Default is 'RegionOne'). Enter the name of the PMK region you are operating within. Default region for a new PMK deployment is 'RegionOne'. This parameter should be left to default value for PMK Free Tier users as the Free Tier does not have the feature to add new regions enabled. For Enterprise users, enter the name of the PMK Region you are operating within. Your current region is shown in the PMK UI via the 'Region' dropdown in the top right UI nav bar.
  • Enter the Tenant: (Default is 'Service'). Enter the name of the PMK tenant you are operating within. Default tenant for a new PMK deployment is 'Service'. Your current tenant is shown in the PMK UI via the 'Tenant' dropdown in the top right UI nav bar.

The CLI is now configured and can be used to prepare and connect your nodes to the PMK management plane.

Step 3: Prepare Your Nodes

To prepare the current node that the CLI is installed on to be added to a PMK Kubernetes cluster, run the following command.

Bash
Copy

This command will install the required software packages and get your node connected to the PMK management plane.

The CLI can also be used to prepare other remote nodes, assuming the node that the CLI is running on can remotely connect to these nodes via ssh.

To use the CLI to prepare remote nodes, you need to pass the IP address of each of the remote nodes to the prep-node command, along with the SSH username and password to connect to those nodes. Following is an example run of the command to prepare both the current node as well as two other remote nodes.

Bash
Copy

Once all the nodes have been prepared, you can return to the PMK UI and complete the cluster creation of your on-premises cluster using the PMK cluster creation wizard or add more nodes to an existing cluster.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard