Creating Kubernetes Cluster on Bare Metal Servers

This is a documentation and a ready made script to setup basic Kubernetes Cluster to connect to NetBook

Note: This guide is for Ubuntu based systems

Option1 : Quick guide

If you want to do this with a simple script, follow the below steps

export IPS= ('ip1', 'ip2', 'ip3') ( IP addresses of the nodes you want to install Kubernetes clusters)

git clone https://github.com/netbookai/kubespray

cd kubespray/blob/nvidia-gpu-support/

bash multi-gpu-node.sh

Option2: Step by step guide

Prerequisites Client:

Note: All these steps should be run from one of the nodes that you want in your kubernetes cluster

  • Git

  • Python 3.8-3.10

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8
  • Verify by checking

  • openssh-client

Prerequisites Server:

  • openssh-server, openssh-client

Installing Cuda-drivers on GPU

Make sure SSH access is configured first

To configure, run

Copy the public key and add it to the authorized keys file

Open the below file and the paste the keys

Proceed on Installation steps

Note: If you are

Setting up k8s cluster

Post K8s setup

Getting Kubeconfig of cluster

SSH to one server and the config will be found at /etc/kubernetes/admin.conf you just copy and paste this to ~/.kube/config

Installing Nvidia Plugin

Prerequisites:

Helm: Install helm via this : https://helm.sh/docs/intro/install/

Installing DCGM and sending logs to netbook

Post this, you should be able to see your node and cluster metrics on NetBook's platform.

To validate if everything is working fine, run the below commands

You should see GPU usage from this

To validate if Kuberentes is installed and netbook exporter is working, run this

You should see pods running in netbook namespace for dcgm exporter

For issues, reach out at support@netbook.ai

Last updated