#安装说明
https://github.com/NVIDIA/k8s-device-plugin#prerequisites
使用Nvidia-docker2
https://docs.docker.com/config/containers/resource_constraints/#gpu
#安装运行时
apt-get install nvidia-container-runtime
#安装k3s并修改containerd配置,确保containerd可以使用nvidia-container-runtime:
#安装nvidia-device-plugin
#安装k8s-device-plugin
运行时就绪后,我们需要安装k8s-device-plugin,它可以让kubelet获取GPU信息,进而使k3s拥有GPU卡资源的调度能力: