GKE Autopilot Clusters Now Support GPUs and TPUs with DRANET
Quick answer
GKE Autopilot now supports GPUs and TPUs with managed DRANET. Deploy AI workloads without networking headaches. Step-by-step guide inside.
Google Kubernetes Engine (GKE) managed DRANET now supports both GPUs and TPUs, making it easier to run AI workloads without getting bogged down in networking configs. Think of it as letting Google handle the swamp channels while you focus on the fun stuff—like deploying models.
What’s the Big Deal?
GKE Autopilot is the lazy developer’s dream: it manages nodes, scaling, and security for you. With managed DRANET, you can request and allocate networking resources for your Pods, including network interfaces that support TPUs and Remote Direct Memory Access (RDMA). No more wrestling with complex network setups—just smooth sailing.
Setting Up Your Autopilot Cluster with DRANET
Here’s the step-by-step to get your cluster swimming with accelerators:
- Deploy an Autopilot cluster – Use the
gcloudcommand to create a cluster in your chosen region. - Create a custom ComputeClass – Define the accelerator type (GPU or TPU) and enable DRANET networking.
- Create a ResourceClaimTemplate – For GPUs, use
mrdma.google.com; for TPUs, usenetdev.google.com. - Deploy your workload – Reference the ComputeClass and ResourceClaimTemplate in your Pod spec, and watch the magic happen.
Example: GPU B200 ComputeClass
Here’s a YAML snippet for a ComputeClass that uses NVIDIA B200 GPUs with a reservation:
apiVersion: cloud.google.com/v1
kind: ComputeClass
metadata:
name: dranet-a4-computeclass
spec:
nodePoolAutoCreation:
enabled: true
nodePoolConfig:
dra:
networking:
enabled: true
priorities:
- machineType: a4-highgpu-8g
gpu:
count: 8
type: nvidia-b200
acceleratorNetworkProfile: auto
reservations:
affinity: Specific
specific:
- name: ${RESERVATION_URL}
project: ${PROJECT_ID}
Example: TPU v6e ComputeClass
For TPUs, here’s an on-demand example:
apiVersion: cloud.google.com/v1
kind: ComputeClass
metadata:
name: dra-gke-auto
spec:
nodePoolAutoCreation:
enabled: true
nodePoolConfig:
dra:
networking:
enabled: true
priorities:
- tpu:
type: tpu-v6e-slice
count: 8
topology: "2x4"
acceleratorNetworkProfile: auto
location:
zones:
- us-east5-b
ResourceClaimTemplate Examples
For GPUs (RDMA):
apiVersion: resource.k8s.io/v1
kind: ResourceClaimTemplate
metadata:
name: all-mrdma
spec:
spec:
devices:
requests:
- name: req-mrdma
exactly:
deviceClassName: mrdma.google.com
allocationMode: All
For TPUs (non-RDMA):
apiVersion: resource.k8s.io/v1
kind: ResourceClaimTemplate
metadata:
name: all-netdev
spec:
spec:
devices:
requests:
- name: req-netdev
exactly:
deviceClassName: netdev.google.com
allocationMode: All
Deploying a Workload
Once your ComputeClass and ResourceClaimTemplate are ready, deploy a Pod that references them. For example, a deployment for Gemma 4 on GPUs:
apiVersion: apps/v1
kind: Deployment
metadata:
name: gemma-4-31-deploy
spec:
replicas: 2
selector:
matchLabels:
app: gemma4
template:
metadata:
labels:
app: gemma4
ai.gke.io/model: gemma-4-31b
ai.gke.io/inference-server: vllm
spec:
resourceClaims:
- name: rdma-claim
resourceClaimTemplateName: all-mrdma
containers:
- name: vllm-inference
image: us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-vllm-serve:gemma4
resources:
requests:
cpu: "10"
memory: "1000Gi"
ephemeral-storage: "1Ti"
nvidia.com/gpu: "8"
limits:
cpu: "10"
memory: "1000Gi"
ephemeral-storage: "1Ti"
nvidia.com/gpu: "8"
claims:
- name: rdma-claim
command: ["python3", "-m", "vllm.entrypoints.openai.api_server"]
args:
- --model=$(MODEL_ID)
- --tensor-parallel-size=8
- --host=0.0.0.0
- --port=8000
- --max-model-len=131072
- --max-num-seqs=16
- --enable-chunked-prefill
- --gpu-memory-utilization=0.90
env:
- name: MODEL_ID
value: google/gemma-4-31B
- name: HUGGING_FACE_HUB_TOKEN
valueFrom:
secretKeyRef:
name: hf-secret
key: hf_token
volumeMounts:
- mountPath: /dev/shm
name: dshm
startupProbe:
httpGet:
path: /health
port: 8000
failureThreshold: 240
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 8000
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 8000
periodSeconds: 5
volumes:
- name: dshm
emptyDir:
medium: Memory
nodeSelector:
cloud.google.com/compute-class: dranet-a4-computeclass
Notice how the deployment references the ResourceClaimTemplate and ComputeClass. When this kicks off, it triggers a scale-up operation. GKE Autopilot reads the ComputeClass to provision the specific node type and configure managed DRANET networking. The resource claim acts as the bridge, binding your Pods directly to the accelerators. This works exactly the same for TPUs.
Next Steps
Want to dive deeper? Check out these resources:
- Hands-on Lab: GKE Autopilot clusters with TPUs, DRANET, and Gemma 4
- DRANET Documentation
- AI Hypercomputer Overview
For more on Google Cloud’s offerings, check out our Google Cloud Review.
Original announcement published on Google Cloud.