>- Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).
npx skills add https://github.com/google/skills --skill gke-inference
This reference covers deploying AI/ML inference workloads on GKE using Google's
Inference Quickstart (GIQ) and best practices for LLM serving.
> MCP Tools: apply_k8s_manifest, get_k8s_resource, get_k8s_logs,
> get_k8s_rollout_status, describe_k8s_resource, list_k8s_events.
> CLI-only: gcloud container ai profiles *
ComputeClasses and NAP)
gcloud CLI authenticated# List all supported models
gcloud container ai profiles models list --quiet
# Find valid accelerator/server combinations for a model
gcloud container ai profiles list --model=<MODEL_NAME> --quiet
# Example: what can run Gemma 2 9B?
gcloud container ai profiles list --model=gemma-2-9b-it --quiet
gcloud container ai profiles manifests create \
--model=<MODEL_NAME> \
--model-server=<SERVER> \
--accelerator-type=<ACCELERATOR> \
--target-ntpot-milliseconds=<NTPOT> --quiet > inference.yaml
Parameters:
--model: Model ID (e.g., gemma-2-9b-it, llama-3-8b)--model-server: Inference server (vllm, tgi, triton, tensorrt-llm)--accelerator-type: GPU/TPU type (nvidia-l4, nvidia-tesla-a100,nvidia-h100-80gb)
--target-ntpot-milliseconds: Target Normalized Time Per Output Token(optional, for latency optimization)
Example:
gcloud container ai profiles manifests create \
--model=gemma-2-9b-it \
--model-server=vllm \
--accelerator-type=nvidia-l4 \
--target-ntpot-milliseconds=50 --quiet > inference.yaml
# Review for placeholders (HF tokens, PVCs)
cat inference.yaml
# Deploy
kubectl apply -f inference.yaml
# Monitor
kubectl get pods -w
kubectl logs -f <POD_NAME>
> Some models require Hugging Face tokens. Create a Kubernetes Secret and
> reference it in the manifest.
For Autopilot clusters, create a ComputeClass to target GPU nodes:
apiVersion: cloud.google.com/v1
kind: ComputeClass
metadata:
name: l4-inference
spec:
priorities:
- machineFamily: g2
gpu:
type: nvidia-l4
count: 1
minCores: 4
minMemoryGb: 16
| Accelerator | Best For | Memory | Relative Cost |
| ------------------- | ------------------------ | ----------- | ------------- |
| NVIDIA T4 | Budget inference, | 16 GB | Lowest |
: : lightweight legacy : : :
: : models : : :
| NVIDIA L4 (G2) | Small-medium model | 24 GB | Low |
: : inference, video, : : :
: : graphics : : :
| NVIDIA RTX PRO 6000 | Multimodal AI, | 96 GB | Medium |
: (G4) : high-fidelity 3D, : : :
: : fine-tuning : : :
| Cloud TPU v5e | Cost-effective | Varies | Medium |
: : transformer inference : : :
| Cloud TPU v5p | High-performance | Varies | High |
: : training : : :
| Cloud TPU v6e | High-efficiency next-gen | 32 GB/chip | Medium-High |
: (Trillium) : training & serving : : :
| Cloud TPU v7x | Ultra-scale inference & | 192 GB/chip | High |
: (Ironwood) : agentic workflows : : :
| NVIDIA A100 | Large model inference, | 40/80 GB | High |
: : enterprise ML : : :
| NVIDIA H100 / H200 | Frontier model training, | 80/141 GB | Highest |
: : high throughput : : :
| NVIDIA B200 (A4) | Blackwell-scale | 192 GB | Highest |
: : training, FP4 precision : : :
| NVIDIA GB200 (A4X) | Rack-scale AI (Grace | Massive | Highest |
: : Blackwell Superchip) : : :
Use custom metrics for GPU utilization:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: llm-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: llm-server
minReplicas: 1
maxReplicas: 10
metrics:
- type: Pods
pods:
metric:
name: gpu_duty_cycle
target:
type: AverageValue
averageValue: "80"
utilization metrics
batch/on-demand
stabilization windows
utilization for latency-sensitive workloads
increase throughput
trade-off
node
--gpu-memory-utilization in vLLM for KVcache allocation
| Issue | Cause | Fix |
| ------------------ | ------------------------ | --------------------------- |
| Invalid | Unsupported tuple | Re-run `gcloud container ai |
: model/accelerator : : profiles list :
: combination : : --model=<MODEL>` :
| GPU quota exceeded | Regional quota limit | Request quota increase or |
: : : try a different region :
| OOM on GPU | Model too large for | Use larger GPU, enable |
: : accelerator : quantization, or use tensor :
: : : parallelism :
| Slow cold start | Large model loading from | Use local SSD for model |
: : registry : caching; pre-pull images :
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.
Bayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.
Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.
Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
Take google/gke-inference from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.