3 ms·
That's weird, because all the times I tried the experimental support, it didn't need privileged containers. From the YAML files, it looks like it's using hostPa
by puzzle 10y ago
That's weird, because all the times I tried the experimental support, it didn't need privileged containers. From the YAML files, it looks like it's using hostPath directories, but those don't require special privileges, unless you need to write to them:
https://kubernetes.io/docs/concepts/storage/volumes/#hostpath https://kubernetes.io/docs/concepts/storage/volumes/#hostpat...
I suspect that there is a bug somewhere.
- puzzle 10y agoAh, wait: https://github.com/madeden/blogposts/blob/master/k8s-gpu-cloud/src/nvidia-smi.yaml https://github.com/madeden/blogposts/blob/master/k8s-gpu-clo... You don't need to mount the /dev entries into the container at all. The experimental support creates them automatically for you when you are using GPU resources. Perhaps it's device nodes, not the libraries that required privileges?
- samnco 10y agoAaah that is interesting. Let me dive into this later today and test my charts without that. It would actually make my life way easier for charting. I got that from a very early stage work and never questioned it again (the /dev stuff). Thanks for pointing that out.
- samnco 10y agoHello, OK I gave it a try and you are absolutely right. For the nvidia-smi, I could run it the /dev/nvidia0, which is cool. I was also able to run it unprivileged. I guess my mistake was to believe the example from the docs and not test without. Thanks for sharing that, I'll update my charts and the post accordingly.
- puzzle 10y agoAwesome! Happy to hear that more containers will run without unneeded privileges.