If you have GPU devices, you will need to install GPU drivers and device plugin. You can only use GPU when your device plugin and driver are correctly installed.

In this section you will install device drivers and plugin for your GPU device and ensure they are correctly detected.

Note: If you only have CPU devices, then you do not need to install a GPU driver and device plugin and can skip this step.

Install GPU driver and device plugin

The installation method for MicroK8s is different, so if you installed Microk8s as your container runtime, please follow the MicroK8s instructions below.

Microk8s Users

Configure and Install Microk8s GPU Driver and Device Plugin

[Appendix] Install and Configure MicroK8s GPU Driver and Device Plugin

Non-Microk8s Users

Configure and Install Nvidia GPU Driver and Device Plugin

[Appendix] Install and Configure Nvidia GPU Driver and Device Plugin

Verify that your GPU is correctly detected

Check GPU status and nvidia-docker2 is successfully installed:

$ nvidia-smi

Verify the Nvidia device plugin for Kubernetes

$ kubectl -n kube-system get pods | grep nvidia-gpu-device-plugin