In my previous article I talked about configuring GPU in VM level in Proxmox using GPU passthrough. However, the ultimate goal was to make this capability available to containerized workloads. In this post, I’ll walk you through on setting up the GPU enabled capability in the Kubernetes cluster.
To ensure secure and automated access to the newly provisioned VMs, password authentication for the default ubuntu user has been disabled and now it relies on SSH keys. Before deployment, update the cloud-init.yml file with own public SSH key. This cloud-init configuration automatically adds key to the VM upon creation, allowing to connect securely without a password.
Inventory file has been simplified with the recent changes to accommodate the following features.
worker4 ansible_host=192.168.1.69 has_gpu=true node_labels="{'node-role.kubernetes.io/gpu': 'true'}"- has_gpu=true custom variable that acts as a flag
- node_labels applies a label to the node