Add-on: gpu

This addon enables NVIDIA GPU support for MicroK8s.

  1. microk8s enable gpu

Note that this is obviously dependent on the host system having suitable
NVIDIA GPU hardware and the relevant drivers.

With the GPU addon enabled, workloads can request the GPU using a limit
setting, nvidia.com/gpu: 1 . For example:

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: cuda-vector-add
  5. spec:
  6. restartPolicy: OnFailure
  7. containers:
  8. - name: cuda-vector-add
  9. image: "k8s.gcr.io/cuda-vector-add:v0.1"
  10. resources:
  11. limits:
  12. nvidia.com/gpu: 1

Last updated 1 year, 2 months ago. Help improve this document in the forum.