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).
Install microk8s ( 1.27 is our minimal supported version)
sudo snap install microk8s --classic --channel=1.27Verify user is already in microk8s group
groupsIf 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
groupsNow microk8s should appear in the list of groups. If you need to check all groups on the system, you can use:
sudo cat /etc/groupValidate the server is up
microk8s status --wait-readyInstall 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-provisionerInstall nvidia apt pakcages
sudo apt update
sudo apt install nvidia-utils-525 nvidia-driver-525Restart the host machine to allow drivers to be udpated
sudo reboot
microk8s enable gpu
sudo rebootValidate that you see "nvidia.com/gpu" in the output
microk8s kubectl get nodes -ojsonpath="{.items[*]['metadata.name', 'status.allocatable']}"Last updated
Was this helpful?
