/gke-inference
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
$ npx -y skills add google/skills --skill gke-inference --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/gke-inference
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
gke-inference.SKILL.mdname: gke-inference
description: >-
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).
metadata:
category: Containers
GKE AI/ML 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 *`
When to Use
- Deploy an AI model (Llama, Gemma, Mistral, etc.) to GKE
- Generate optimized Kubernetes manifests for inference
- Select GPU/TPU accelerators for model serving
- Configure autoscaling for LLM inference
Prerequisites
- A golden path GKE Autopilot cluster (GPU workloads are supported via
ComputeClasses and NAP)
- `gcloud` CLI authenticated
- Sufficient GPU/TPU quota in the target region
Workflow
1. Discovery: Find Models and Hardware
# 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
2. Generate Manifest
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
3. Review and Deploy
# 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.
GPU ComputeClass for Inference
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: 16Accelerator Selection Guide
| 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) : : :
Autoscaling LLM Inference
GPU-based autoscaling
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"Best practices for inference autoscaling
1. **Use DCGM metrics**: Golden path enables DCGM monitoring for GPU utilization metrics 2. **Set appropriate minReplicas**: At least 1 for always-on serving; 0 for batch/on-demand 3. **Tune scale-down delay**: LLM model loading is slow; use longer stabil
Read more
name: gke-inference description: >- 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). metadata: category: Containers
GKE AI/ML 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 *`
When to Use
- Deploy an AI model (Llama, Gemma, Mistral, etc.) to GKE
- Generate optimized Kubernetes manifests for inference
- Select GPU/TPU accelerators for model serving
- Configure autoscaling for LLM inference
Prerequisites
- A golden path GKE Autopilot cluster (GPU workloads are supported via
ComputeClasses and NAP)
- `gcloud` CLI authenticated
- Sufficient GPU/TPU quota in the target region
Workflow
1. Discovery: Find Models and Hardware
# 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
2. Generate Manifest
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
3. Review and Deploy
# 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.
GPU ComputeClass for Inference
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: 16Accelerator Selection Guide
| 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) : : :
Autoscaling LLM Inference
GPU-based autoscaling
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"Best practices for inference autoscaling
1. **Use DCGM metrics**: Golden path enables DCGM monitoring for GPU utilization metrics 2. **Set appropriate minReplicas**: At least 1 for always-on serving; 0 for batch/on-demand 3. **Tune scale-down delay**: LLM model loading is slow; use longer stabil
This repository contains Agent Skills for Google products and technologies, including Google Cloud. This repository is under active development.
Repo: google/skills
Other skills on google-skills.
- /data-manager-api-audience-ingestion
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client libraries. Use this skill when the user wants to upload audience members, remove specific users, or clear/replace an
Open skill - /data-manager-api-event-ingestion
Guides developers through implementing event and conversion ingestion to Google products using the Data Manager API /v1/events/ingest endpoint and its associated client libraries. Use this skill when the user wants to upload offline conversions, enhanced conversions for leads,
Open skill - /data-manager-api-setup
Guides developers through client library installation and authentication setup steps for the Data Manager API. Use this skill when a user is getting started with the Data Manager API and needs to setup their local environment, install the client library, or setup access to the
Open skill - /google-ads-api-account-diagnostics
Diagnoses Google Ads account performance issues such as conversion loss (value or volume), low lead flow/volume, and lost impression share (opportunities) due to ad rank, bids, or budgets. Use when troubleshooting sudden performance drops, analyzing campaign impression share
Open skill - /google-ads-api-mcp-setup
Guides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server. Use this skill when a user wants to connect their AI assistant (such as Gemini, Claude Code, or Cursor) to their Google Ads account to query campaigns or retrieve
Open skill - /google-ads-api-quickstart
Guides developers through Google Ads API quickstart: credential setup, choosing from 6 client libraries/REST, configuring environments, and running a "retrieve campaigns" script. Troubleshoots common setup errors: USER_PERMISSION_DENIED, login_customer_id issues, and
Open skill

