DKube-Specific Steps for an Existing VMWare Tanzu Cluster

This section describes the setup required to install DKube on an existing Tanzu cluster.

Important

The versions of software must be consistent with the prerequisites at Prerequisites

Note

If the Tanzu cluster does not have any GPUs installed, only the first section is required. If the cluster has GPUs installed, additional setup steps are required as described below.

Getting the kubeconfig file

The following commands will copy kubeconfig file to the installation node:

tanzu cluster kubeconfig get <workload-cluster-name> --admin kubectl config use-context <workload-cluster-name>-admin@<workload-cluster-name>

The next installation setup steps depend upon whether or not the cluster has GPUs installed.

GPUs

Setup Instructions

No GPUs installed

Go to the DKube installation section at Installing DKube

With GPUs installed

Continue with the rest of the steps below

Preparing the Cluster

This section describes how to prepare the cluster for DKube installation. The steps are executed from the $HOME/.dkube folder. The k8s.ini file needs to be edited in order do the setup command.

Editing the k8s ini File

The k8s.ini file has the following format:

_images/k8s-ini-file-tanzu.png

Only the following fields should be filled in:

Field

Value

provider

tanzu

distro

Operating system type

nodes

Node DNS names or IP addresses

STORAGE_TYPE

disk

user

The user name for the DKube cluster account

User

This is the DKube cluster user account name. It can be a root or non-root account, but the same account must be available on all cluster nodes, and must have passwordless access through an ssh key and sudoers permissions.

Changing Nodes or GPUs on Cluster After DKube Installation

In order to enable DKube to recognize changes in nodes or GPUs in the cluster after the initial installation, the following steps should be performed.

  • For changes in nodes

    • Edit the $HOME/.dkube/k8s.ini file to add the new nodes as described in this section

    • The other fields should not be changed

    • Ensure that the new node is accessible passwordlessly from the installation node as described in Cluster Access from the Installation Node

  • For either node or GPU changes

    • Run the node setup command as described in Node Setup to install prepare the new nodes

DKube will automatically recognize the new nodes after the setup command.

Cluster Access from the Installation Node

In order to run the installation, the installation node needs to be able to access each node in the cluster without requiring a password. In each case, sudoers account access must be provided.

The sudoers file on each node must include the DKube cluster account name with the necessary access. This can be accomplished using the visudo command, and adding the following line:

<username> ALL=(ALL) NOPASSWD:ALL

Important

Even in the case where the master node is used as the installation node, the ssh key pair must still be added to the master node authorized_keys file in the $HOME/.ssh directory

If you have an existing ssh key pair, it is assumed that the private key works with all of the DKube cluster nodes, including the master node. In this case, the following steps are required:

  • Copy the private key to the $HOME/.dkube directory. It needs to be copied with the name ssh-rsa

  • Delete the file ssh-rsa.pub from the $HOME/.dkube directory, since it will not match your new private ssh-key file


Final Access Verification

After the security access steps have been taken, the user should ensure that each node in the cluster can be properly accessed by the installation node without a password.

The installation process should not move ahead if this verification step is not successful.

sudo ssh -i ssh-rsa <username>@<Master Node IP Address>

Node Setup

Before installing DKube, the necessary software packages need to be added to each node in the DKube cluster. The k8s.ini file was configured to provide the information necessary. The following command will install the packages required.

sudo ./dkubeadm node setup

Note

If you have A100 GPUs installed on your cluster, please ensure that you follow the section Adding A100 GPUs to the Cluster

Installing DKube

DKube is installed using Helm. Continue the installation at Installing DKube