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.
- Browser (for vcluster.cloud)
- Terminal with kubectl installed
- vCluster CLI installed
# 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:
- Click Projects → Create Project
- Name it (e.g.,
gpu-workshop)
In your project:
- Click Virtual Clusters → Create Virtual Cluster
- Select a template with GPU/Autonodes enabled
- Click Create
# Login to platform
vcluster platform login https://your-instance.vcluster.cloud
# Connect to your vCluster
vcluster connect my-vcluster --project gpu-workshopkubectl apply -f gpu-test-pod.yamlWatch the node appear:
kubectl get nodes -wCheck GPU access:
kubectl logs gpu-testkubectl 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-smiDelete the pod to trigger scale-down:
kubectl delete pod gpu-testWatch 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