Skip to content

Repository files navigation

Autonodes Workshop

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.

Prerequisites

  • 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/

Setup

1. Create Platform Account

Go to vcluster.cloud and sign up. No credit card required.

2. Create a Project

In the Platform UI:

  • Click ProjectsCreate Project
  • Name it (e.g., gpu-workshop)

3. Create a vCluster with Autonodes

In your project:

  • Click Virtual ClustersCreate Virtual Cluster
  • Select a template with GPU/Autonodes enabled
  • Click Create

4. Connect to Your vCluster

# Login to platform
vcluster platform login https://your-instance.vcluster.cloud

# Connect to your vCluster
vcluster connect my-vcluster --project gpu-workshop

Deploy a GPU Workload

Simple GPU Test

kubectl apply -f gpu-test-pod.yaml

Watch the node appear:

kubectl get nodes -w

Check GPU access:

kubectl logs gpu-test

Interactive GPU Shell

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

Clean Up

Delete the pod to trigger scale-down:

kubectl delete pod gpu-test

Watch the node disappear:

kubectl get nodes -w

Useful Commands

# 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

Resources

Releases

Packages

Contributors

Languages