GPU nodes on demand with vCluster Platform.
Note: This demo requires a specially designed terraform module for GPU provisioning that is not publicly accessible yet. Users should use vcluster-auto-nodes-gcp and adjust it for GPU nodes. We are working on open sourcing the GPU-specific module.
# Install vCluster CLI
curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/latest/download/vcluster-linux-amd64"
chmod +x vcluster
sudo mv vcluster /usr/local/bin/
Go to vcluster.cloud and sign up. No credit card required.
In the Platform UI:
gpu-workshop)In your project:
# Login to platform
vcluster platform login https://your-instance.vcluster.cloud
# Connect to your vCluster
vcluster connect my-vcluster --project gpu-workshop
kubectl apply -f gpu-test-pod.yaml
Watch the node appear:
kubectl get nodes -w
Check GPU access:
kubectl logs gpu-test
kubectl run gpu-shell \
--image=nvidia/cuda:12.2.0-runtime-ubuntu20.04 \
--restart=Never \
--rm -it \
--overrides='{
"spec": {
"containers": [{
"name": "gpu-shell",
"image": "nvidia/cuda:12.2.0-runtime-ubuntu20.04",
"stdin": true,
"tty": true,
"resources": {
"limits": {
"nvidia.com/gpu": "1"
}
}
}]
}
}'
Inside the container:
nvidia-smi
Delete the pod to trigger scale-down:
kubectl delete pod gpu-test
Watch the node disappear:
kubectl get nodes -w
# See all nodes
kubectl get nodes
# See node details
kubectl describe node <node-name>
# See pending pods
kubectl get pods -A --field-selector=status.phase=Pending
# See node claims (Platform resource)
kubectl get nodeclaims -A