In this section, you will install and enable your GPU in MicroK8s.

Download and install

Download and install Nvidia GPU drivers from the official Nvidia website.

Download Drivers

Enable GPU in MicroK8s

The instructions to enable GPU in MicroK8s differ depending on the version of MicroK8s you are using.

MicroK8s ≤ 1.20

For versions of MicroK8s up to, and including, version 1.20, use the following command.

microk8s.enable gpu

MicroK8s 1.21

Reference