Kubernetes (MicroK8s) Installation guide

The following article demonstrate a sequence of commands that Tabnine users use to setup microK8s kubernetes on an ubuntu server (22.04 LTS, 20.04 LTS, 18.04 LTS or 16.04 LTS).

In case you already have a Kubernetes cluster installed, you can skip this guide and proceed straight to our deployment guide to install tabnine.

Install microk8s ( 1.27 is our minimal supported version)

sudo snap install microk8s --classic --channel=1.27

Verify user is already in microk8s group

groups

If microk8s is not present in print, add user to group (Replace ubuntu with your username if different):

sudo usermod -aG microk8s ubuntu
sudo newgrp microk8s
groups

Now microk8s should appear in the list of groups. If you need to check all groups on the system, you can use:

sudo cat /etc/group

Validate the server is up

microk8s status --wait-ready

Install some required addons

microk8s enable ingress
microk8s enable metrics-server
microk8s helm install -n local-path-provisioner --create-namespace  local-path-provisioner  oci://registry.tabnine.com/self-hosted/local-path-provisioner

Install nvidia apt pakcages

sudo apt update
sudo apt install nvidia-utils-525 nvidia-driver-525

Restart the host machine to allow drivers to be udpated

sudo reboot
microk8s enable gpu
sudo reboot

Validate that you see "nvidia.com/gpu" in the output

microk8s kubectl get nodes -ojsonpath="{.items[*]['metadata.name', 'status.allocatable']}"

Last updated