SSH Setup for Remote Cluster Creation

The Platform9 Managed Kubernetes (PMK) CLI (pf9ctl) provides an easy way to create and manage your BareOS Kubernetes clusters. The CLI lets you automate all aspects of creation of highly available multi-master Kubernetes clusters using physical or virtual machines in your on premises data center.

The CLI may be utilized to configure and deploy Kubernetes clusters as a remote kubernetes management tool. To do this you require an Ubuntu virtual machine or physical server where you download and install the CLI. Then you are able to use the CLI to prepare your machines with all pre-requisites and then use the Platform9 UI to finish creation of the cluster. Or you can use the CLI for the entire cluster creation process. To use the CLI as a remote management tool you must first configure remote SSH for the target nodes.

SSH Setup for Remote Nodes

If you want to use the CLI to create a PMK cluster on remote nodes, then you need to setup ssh based authentication on these nodes with either a password or ssh key.

If creating a cluster with multiple nodes, you need the following configured across all the nodes first:

  • Same username - The CLI requires that you specify the username as a parameter during cluster creation.
  • Same ssh password or common ssh key - The CLI requires that you specify either of these as a parameter during cluster creation.

Follow these instructions to create an ssh key-pair and populate the public key on all your nodes.

  • Ensure you have created a user account with the same userid on each node

  • Create a new ssh key pair (or skip this instruction if you are using an existing key pair).

ssh-keygen -t rsa -b 2048
  • Copy over the public key portion of the key pair to all the remote nodes. ssh-copy-id is a simple utility that lets you do this without the copy-paste overhead. When you use ssh-copy-id, the public key will be added to the node’s authorized_keys file for the specified user. Make sure this is the common user account you created on all the nodes.
ssh-copy-id [-i <path to ssh public key>] <user>@<remote ip>
  • Test connectivity with the key
ssh [-i <path to ssh private key>] <user>@<remote ip>

Thats it! Now you are all set to create a PMK cluster on these remote nodes