k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
26.62k stars 2.24k forks source link

k3s cluster should use GPU without mentioning runtimeClassName: "nvidia" in pod specs #10034

Closed khalidkhushal closed 2 weeks ago

khalidkhushal commented 2 weeks ago

Hi, I have installed a k3s cluster and gpu operator using nvidia official docs. Everything seems to work fine and pods are able to use GPUs but I have to define runtimeClassName: "nvidia" in pod specs.

Do we have any other way of doing it? Can I somehow make the k3s pods to use GPUs without defining runtimeClassName: "nvidia" in pod specs?

cwayne18 commented 2 weeks ago

This is expected behavior at this time, although we are looking at ways to make using GPUs easier

khalidkhushal commented 2 weeks ago

This is expected behavior at this time, although we are looking at ways to make using GPUs easier

I am using kubeflow manifest to deploy kubeflow on K3s, how can I add runtimeClassName in pods creation for it? I have been looking for admisssion webhooks for it, but still I am on R&D.

I would appreciate your kind guidance on this.

brandond commented 2 weeks ago

Duplicate of https://github.com/k3s-io/k3s/issues/8700 - see the --default-runtime flag from https://github.com/k3s-io/k3s/pull/8936