Connecting Clusters

Now that your loft instance is running, you are ready to connect your first cluster and prepare it for the use by your engineers. Connecting a cluster is the first step to making a cluster available to your engineers.

Connect loft Cluster

To manage the cluster where loft is running in (loft cluster) using loft, you need to connect it. You can skip this step if you only want to connect other clusters instead. However, it is often useful to connect the loft cluster to manage this cluster using loft although you may not want to make it available to the rest of your team.

In the loft UI, navigate to "Clusters" and click the Connect Cluster button.

loft UI - Connect Loft Cluster
STEP 1

Define Cluster Name

Enter a name for your cluster. This name must be a Kubernetes-compatible object name, i.e. only lowercase characters and dashes are allowed.

Naming

Cluster names should tell engineers what the cluster is used for and where it is located, e.g. gke-prod, gke-dev-tpu-us-1, eks-dev-us-west-1


STEP 2

Connect loft cluster

Because loft already has access to the cluster it is running inside, you will see a special button Connect loft cluster which will let you connect the management cluster with a single click.

Connect Other Clusters

In the loft UI, navigate to "Clusters" and click the Connect Cluster button.

loft UI - Connect Cluster
STEP 1

Define Cluster Name

Enter a name for your cluster. This name must be a Kubernetes-compatible object name, i.e. only lowercase characters and dashes are allowed.

Naming

Cluster names should tell engineers what the cluster is used for and where it is located, e.g. gke-prod, gke-dev-tpu-us-1, eks-dev-us-west-1


STEP 2

Generate Kube-Config

To give loft access to a cluster, you need to provide a kube-config for this cluster.

Option A: To automatically create a kube-config using loft CLI, run the following command:

loft generate admin-kube-config
caution

Make sure you are in the right cluster/context before executing the command shown above.

Option B: To manually create a kube-config, you need to:

  1. Create a ServiceAccount
  2. Create a ClusterRoleBinding to bind the ServiceAccount to the ClusterRole cluster-admin
  3. Create a kube-config for the cluster using the token of the ServiceAccount created above

STEP 3

Enter Kube-Config & Connect

Enter the kube-config into the textarea and click the Connect button.