Jump to main content

MicroK8s on NVIDIA DGX

On DGX systems you will need to enable GPU support right after you install MicroK8s:

sudo snap install microk8s --classic
sudo microk8s enable gpu

MicroK8s installs the NVIDIA operator which allows you to take advantage of the GPU hardware available.

Verify the installation

To verify the installation works as expected you can try to perform a CUDA vector addition by applying the following manifest (save this file and use kubectl apply):

apiVersion: v1
kind: Pod
  name: cuda-vector-add
  restartPolicy: OnFailure
    - name: cuda-vector-add
      image: "k8s.gcr.io/cuda-vector-add:v0.1"
          nvidia.com/gpu: 1

After the addition completes, check the logs of the cuda-vector-add pod to see if it succeeded.

Multi-Instance GPU (MIG)

Multi-Instance GPU (MIG) allows GPU partitioning so they can be safely used by CUDA applications. Starting from MicroK8s v1.23 MIG can be configured via configMaps, please see the NVIDIA operator docs on this topic.

Last updated 6 months ago. Help improve this document in the forum.