Google Cloud Solution Guided Gke AI Migration
GoogleOfficialPublished by Google
- Skill
- Workflow
- Cloud and DevOps
- Apache-2.0
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured, four-phase architectural workflow for migrating AI inference workloads from platforms like Cloud Run, Gemini API, or custom VMs to self-hosted Google Kubernetes Engine (GKE). It acts as an interactive architect, assisting users through discovery, solution design, implementation, and validation. The skill emphasizes GKE best practices, including the use of Custom Compute Classes, vLLM for serving, and secure secret management, while providing clear guidance on hardware sizing and traffic cutover.
What it does
- Inspects existing AI workload configurations and infrastructure via gcloud.
- Calculates VRAM requirements and recommends optimal GPU hardware.
- Generates Kubernetes manifests for vLLM deployment, storage, and networking.
- Provides commands for staging model weights and deploying to GKE.
- Offers guidance on traffic cutover and validation of inference endpoints.
- Enforces secure handling of sensitive tokens and API credentials.
When to use it
- When migrating an existing AI inference workload to GKE.
- When you need an architect-led, manual approach to GKE infrastructure design.
- When you require assistance with hardware sizing and manifest generation for AI models.
- When you need to transition from managed services to self-hosted inference on GKE.
Advantages
- Follows a structured, repeatable architectural migration path.
- Promotes GKE best practices like Custom Compute Classes and Workload Identity.
- Provides clear, step-by-step guidance for complex infrastructure tasks.
- Ensures secure configuration by separating secret creation from manifest deployment.
Usage examples
- “I want to move my Cloud Run AI inference service to GKE. Can you help me?”
- The agent initiates the Discovery phase, requesting permission to inspect your current Cloud Run service to understand your model, resource, and traffic requirements.
- “I have a Llama 3 70B model running on a VM and want to migrate it to GKE. What hardware do I need?”
- The agent calculates the required VRAM based on your model parameters and quantization, then recommends specific GPU types and a GKE cluster configuration.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/google-cloud-solution-guided-gke-ai-migration/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip google-cloud-solution-guided-gke-ai-migration.zip -d .agents/skills
Documentation by Google
Migrate AI Workloads to GKE Inference
This skill guides agents through the end-to-end process of migrating existing AI inference workloads (e.g., from Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted inference on Google Kubernetes Engine (GKE). The agent will act as an interactive architect, using a structured 4-phase workflow to discover requirements, design a Google Cloud-native solution, execute the implementation using gcloud and kubectl, and validate the deployment.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Gemini Cloud Assist MCP off-ramp
This skill covers manual, architect-guided migration only. Automated migration is the job of the Gemini Cloud Assist MCP server. Route between them as follows:
The user asks to USE Gemini Cloud Assist or MCP automation for this migration (e.g., "use the Cloud Assist MCP server to do this"): stop the manual workflow and respond with the 4 required points below.
The user mentions MCP only in passing, or explicitly declines it (e.g., "no MCP, let's do this manually"): proceed with the manual workflow. Do not stop and do not ask about MCP.
The user does not mention MCP at all: proceed directly to the active phase. In your first discovery response only, add one sentence noting that an automated alternative exists via the Gemini Cloud Assist MCP server and the user can switch to it at any time. Do not wait for an answer before beginning discovery.
When stopping for an MCP request, your response MUST include these 4 points:
STOP the manual workflow & clarify scope: State that
google-cloud-solution-guided-gke-ai-migrationis strictly intended for manual, architect-guided migration using native CLIs (gcloudandkubectl), and that this manual skill workflow is being stopped.Explain MCP capabilities: Explain that the Gemini Cloud Assist MCP server assists in automated infrastructure analysis (
gemini_cloud_assist:ask_cloud_assist) or direct Google Cloud resource mutation (gemini_cloud_assist:invoke_operation).Link to MCP Documentation: Provide a valid hyperlink to the Gemini Cloud Assist MCP Documentation.
Link to Intent to Infrastructure Codelab: Provide a valid hyperlink to the Intent to Infrastructure Codelab for guidance on setting up the MCP server.
Scope Check: New Deployments vs. Migrations
This skill is specifically intended for migrating existing AI workloads (from Cloud Run, Gemini API, Agent Platform, or other platforms) to GKE.
If the user wants to deploy a new AI model server from scratch on GKE (and does NOT have an existing deployment to migrate), STOP and recommend using the gke-inference skill instead. Explain that google-cloud-solution-guided-gke-ai-migration focuses on migration workflows (discovering existing Cloud Run/Agent Platform configurations, traffic cutover, etc.), while gke-inference is optimized for fresh GKE AI model server deployments using AI Profiles and golden path manifests.
Core Architectural Principles (The "Golden Path")
When designing the solution, always default to the latest GKE AI best practices:
Execution:
Execution policy (who runs commands):
Phase 1 (Discovery): after the user grants permission, execute read-only
gcloudinspection commands (list,describe) directly and summarize the results.Phases 2-4: write manifests to disk, then present the exact
gcloudandkubectlcommands for the user to run. Do not execute mutating commands (apply,create,delete, cluster or IAM changes) unless the user explicitly asks you to run them, in which case execute them and report each command's actual output.Informational and troubleshooting questions: answer with markdown guidance, manifests, and recommended commands only; execute nothing.
Favor raw Kubernetes manifests, native CLIs (
gcloudfor infrastructure,kubectlfor workloads), and opinionated templates.Save YAML files to the user's current directory and apply them using
kubectl.Write ad-hoc scripts (e.g., for VRAM calculation) only if absolutely necessary.
Node Provisioning:
Utilize Custom Compute Classes (CCC) to maximize accelerator obtainability (e.g., dynamically choosing spot vs. on-demand or specific GPU profiles).
Use GKE's managed GPU driver installations.
Select appropriate node topologies: use a single node in a static pool for a simple job, or multiple nodes with LWS/CCC for larger jobs.
Inference Stack & Versioning:
Default to vLLM (
vllm/vllm-openai) as the standard LLM serving engine. If migrating from Vertex AI, the user may opt to retain the Vertex AI Model Garden image (e.g.,pytorch-vllm-serve), which is permissible.Explicit Entrypoint Override: Regardless of the chosen image, the vLLM Deployment MUST explicitly set
command: ["python", "-m", "vllm.entrypoints.openai.api_server"]to bypass potentially problematic entrypoint scripts (likegcs_download_launcher.shin Vertex AI images) that crash when passed standard vLLM arguments.Always pin an explicit, stable vLLM image tag, never
:latest. Resolve the current stable release at design time (check the vLLM releases page, or take the tag fromgcloud container ai profiles manifests createoutput) and record it inmigration-state.md; do not reuse a tag remembered from a previous migration or from documentation examples.Expose the service through the GKE Gateway API. Default to a regional internal Application Load Balancer (
gatewayClassName: gke-l7-rilb) with an HTTPRoute that sends/v1requests to the vLLM ClusterIP service ({workload_name}-vllm-svc) on port 8000, based onassets/gke-inference-gateway.yaml.tmpl.If the user needs LLM-aware load balancing (routing on KV-cache utilization, queue depth, or LoRA adapter placement), offer the GKE Inference Gateway as an upgrade: it requires an
InferencePoolresource as the HTTPRoute backend instead of a Service, and it is only supported on thegke-l7-rilbandgke-l7-regional-external-managedGatewayClasses. Fetch About GKE Inference Gateway before generating InferencePool manifests; do not improvise them from memory.For multi-node models, use LeaderWorkerSet (LWS) with vLLM.
Security & Access:
Always use GKE Workload Identity for Google Cloud API access.
Gated Model Secret Security: For gated models (e.g., Llama 3, Gemma) requiring Hugging Face tokens (
HF_TOKEN):NEVER write literal token values into Deployment or Pod specifications; reference the secret securely using
env.valueFrom.secretKeyRef(e.g., pointing tohf-secret).Always warn the user about the security risks of exposing sensitive API tokens in plain text prompts or manifest files.
NEVER write a Kubernetes
Secretmanifest to disk, and do NOT include it in templates. Instead, explicitly instruct the user to create the Secret directly via CLI before applying any other manifests:kubectl create secret generic hf-secret --namespace={namespace} --from-literal=hf_api_token=<YOUR_HF_TOKEN>with the user substituting the real value themselves.If the user has already pasted a token into the conversation, treat that token as exposed: use a
<YOUR_HF_TOKEN>placeholder in every command and manifest you produce, and advise the user to revoke and reissue the token at https://huggingface.co/settings/tokens once the migration is complete.
Endpoint exposure: Default the Gateway to the internal class (
gke-l7-rilb). The vLLM OpenAI-compatible endpoint has no built-in authentication; if the user requires external exposure, warn them explicitly that an unauthenticated external listener is an open inference API on their GPU bill, and require an explicit decision plus a fronting control (IAP, an authenticating API gateway, or strict client allowlisting) before generating an externally-exposed Gateway manifest.
Model Storage & Cold Starts:
Stage the chosen model in a Cloud Storage bucket to save on downloading more than once.
Execute staging via a Job on the cluster: Explain to the user that staging weights via a cluster Job avoids downloading heavy weights to their local workstation and avoids re-downloading on every container restart. Always save the staging manifest as
model-staging-job.yamland instruct the user to runkubectl apply -f model-staging-job.yaml.Staging Logic based on Source/Target:
Source is Hugging Face ( gCS FUSE or Lustre target): Use the staging Job to download weights directly to the PVC.
Source is GCS (GCS FUSE target): The staging Job is OPTIONAL. If the PVC mounts the GCS bucket directly via FUSE, the weights are already accessible and no staging step is needed.
Source is GCS (Lustre target): Use the staging Job to copy weights from the source GCS bucket to the Lustre PVC (e.g., using
gcloud storage cp).
Favor Cloud Storage staging via Cloud Storage FUSE for most workloads, or Managed Lustre for ultra-low latency, PiB-scale needs.
Every pod that mounts a Cloud Storage FUSE volume MUST carry the pod annotation
gke-gcsfuse/volumes: "true"(this injects the FUSE sidecar) and MUST run as the Kubernetes ServiceAccount bound to a Google service account withroles/storage.objectUseron the model bucket via Workload Identity. A pod missing either one will fail to mount or fail to read; check both before troubleshooting anything else storage-related.
Observability:
Default to Google Cloud Managed Service for Prometheus with DCGM metrics for deep GPU visibility.
Autoscaling:
Do NOT assume the user wants Horizontal Pod Autoscaling (HPA); you MUST ask them during discovery.
If HPA is declined, omit all autoscaling manifests.
If HPA is desired, warn the user about the LLM Autoscaling Trap: standard CPU, Memory, and GPU Memory utilization metrics are unreliable because vLLM preallocates VRAM for KV caching, appearing highly utilized constantly.
Recommend scaling based on custom server metrics reflecting actual concurrency or queue depth (e.g.,
vllm:num_requests_waitingor batch size).Include a reasonable default in the form of Queue Size unless the user specifically mentions a different metric.
Implementation can use either GKE Custom Metrics (Stackdriver Adapter) or KEDA.
Workflow
The solution design and implementation workflow consists of the following 4 phases:
Phase 1: Discovery: Inspect existing infrastructure via
gcloudand gather model/traffic requirements.Phase 2: Solution Design: Calculate VRAM requirements, select hardware/storage, and generate Kubernetes manifests.
Phase 3: Implementation: Provision resources, stage model weights via an ephemeral pod, and apply workload manifests using
kubectl.Phase 4: Validation and Cutover: Verify pod health and endpoint inference, then provide traffic migration guidance.
At the start of every architectural response, print a simple visual progress indicator line to keep both the user and model aligned on the current phase:
**Migration Progress:** [● Discovery] ➔ [○ Solution Design] ➔ [○ Implementation] ➔ [○ Validation](Update ● to mark the current active phase, e.g., [● Solution Design] during Phase 2).
Phase Routing Rules
Determine the active phase based on the user's prompt context:
If migration-state.md exists in the current directory, read it before anything else and resume from the recorded phase with the recorded values; only re-ask a discovery question if its value is missing from the file or contradicted by the user's prompt.
Phase 1 (Discovery): Use for new migration requests without prior discovery.
Phase 2 (Solution Design): Use when the prompt indicates discovery is complete or asks for architecture design / YAML manifest generation.
Phase 3 (Implementation): Use when the prompt indicates model weights are staged or asks directly for deployment steps/commands. Progress indicator:
**Migration Progress:** [○ Discovery] ➔ [○ Solution Design] ➔ [● Implementation] ➔ [○ Validation].Phase 4 (Validation): Use when the prompt indicates the workload is running or asks for health checks/testing steps.
Phase 1: Discovery
The goal of Phase 1 is to discover all workload specifications necessary to design and build the target GKE inference infrastructure.
Phase 1 Response Requirements: Every response during Phase 1 MUST begin with the visual progress indicator: **Migration Progress:** [● Discovery] ➔ [○ Solution Design] ➔ [○ Implementation] ➔ [○ Validation].
Discovery Checklist (Attributes to Identify)
The agent must discover or confirm the following 6 core attribute categories:
Source Platform & Service Configuration:
Source platform (Cloud Run, Gemini API, Gemini Enterprise Agent Platform, custom VM).
Container image tag, environment variables, CPU/RAM allocations, and secret bindings.
Model Specifications:
Model name and parameter size (e.g., Gemma 2 9B, Llama 3 70B).
Target precision & quantization tolerance (FP16/BF16 vs INT8/INT4 AWQ). Must inquire about quantization tolerance during discovery.
Gated model status (whether Hugging Face token
HF_TOKENaccess is required).Model-Specific Architecture Requirements: Explicitly check the model card (e.g., on Hugging Face) or
config.jsonfor custom configuration requirements. For example, determine if the architecture requires--trust-remote-code(like Qwen models), specific rope scaling arguments, or other custom flags.
Target GKE & Hardware Infrastructure:
Target GKE cluster name and region (or confirm creating a new cluster).
Accelerator preference (L4, A100, H100, TPU v5e) and provisioning model (Spot/CCC vs On-Demand).
Regional quota availability for requested GPUs/TPUs.
Model Storage & Staging:
Current location of model weights (GCS bucket, Hugging Face Hub, external URL).
Preferred storage integration (Cloud Storage FUSE vs Managed Lustre).
Traffic Profile & Load Balancing:
Expected traffic volume, concurrency, and request patterns (spiky vs consistent baseline).
Load balancing needs (GKE Inference Gateway, standard Ingress/Service).
Autoscaling Requirements: Ask the user if they need Horizontal Pod Autoscaling (HPA). Do not assume they do. If they do, identify target metrics (defaulting to Queue Size) and discuss the LLM Autoscaling Trap.
Model Equivalence (Gemini API / Agent Platform sources only):
Which Gemini model and API features are in use (function calling, system instructions, context length, multimodal inputs).
Which open-weights model will replace it, and how the user plans to evaluate output quality against the current system before cutover.
Client impact: the vLLM endpoint is OpenAI-compatible, not Gemini-API-compatible; identify the client code and SDK calls that must change.
Discovery Execution (Automated & Interactive)
Request Infrastructure Access & Permission First: You MUST explicitly request permission from the user to inspect existing environment resources via CLI commands (such as
gcloud run services listorgcloud run services describe) before executing any discovery commands.Inspection Upon Approval: Once the user grants permission, execute
gcloudCLI commands, inspect environment variables, and review local workspace files to populate checklist items automatically:Cloud Run Workloads: Run
gcloud run services list --format="table(metadata.name,status.url,status.latestReadyRevisionName)"to enumerate services, thengcloud run services describe {service_name} --format="yaml(spec.template.spec.containers,spec.template.metadata.annotations,spec.template.spec.serviceAccountName,spec.template.spec.containerConcurrency)"to extract only the container image, env vars, resource limits, concurrency, and secret bindings. Prefer--formatfilters on all discovery commands; never pull a full unfiltered resource description into the conversation.Existing GKE Clusters: Run
gcloud container clusters listandgcloud container clusters describe {cluster_name}to inspect active cluster config, Workload Identity setup, and available accelerator pools.Vertex AI / Storage: Run
gcloud ai endpoints listorgcloud storage buckets listto locate model artifacts and storage buckets.Workspace & Environment: Inspect local configuration files or environment variables in the active workspace directory.
Summarize, Query Missing Items, and Confirm: Present a consolidated summary of all discovered configuration data and prompt the user for any remaining missing attributes. If any checklist item is unresolved or ambiguous, obtain explicit user confirmation before moving to Phase 2. If every checklist item was resolved without ambiguity, you MAY present the discovery summary and the Phase 2 solution design in the same response, under a single combined approval gate; the design approval then covers both.
Persist discovery state: After the user confirms the discovery summary, write it to
migration-state.mdin the current directory: one section per checklist category with the confirmed values, plus a final lineCurrent phase: <phase name>. Update theCurrent phase:line every time the workflow advances a phase.
Phase 2: Solution Design
Based on the discovery phase, design the architecture and manifests needed to accomplish the migration.
Phase 2 Response Requirements: Every response during Phase 2 MUST begin with the visual progress indicator: **Migration Progress:** [○ Discovery] ➔ [● Solution Design] ➔ [○ Implementation] ➔ [○ Validation].
Just-in-Time Context Loading: When evaluating specific architectural choices below (e.g., storage options, load balancing, or autoscaling), fetch and read the relevant reference documentation link from the Supporting links section as needed.
Map components and alternatives: For each major component (e.g., Load Balancing, Autoscaling, Single vs Multi-node), present your recommended "Golden Path" option along with alternatives. If the user requested HPA, ensure the design addresses the LLM Autoscaling Trap and recommends custom metrics (defaulting to Queue Size).
Accelerator Selection: Refer to GPU platforms or Plan your TPU configuration in GKE to recommend the best accelerator for the target model. (Note: the manifest templates in
assets/are GPU-only. If the user selects Cloud TPU, state this explicitly, and base the serving manifests on the GKE TPU serving documentation instead of the templates in this skill.)Storage Selection: Refer to GCP AI Storage Options to recommend the best storage solution for model staging and serving.
Hardware & VRAM Sizing: Accurately calculate VRAM using the Deterministic VRAM Sizing Formula below, based on parameters, context window, and quantization. Map to appropriate GPUs (L4, A100, H100).
Cluster & Node Setup: Design the appropriate cluster for the job. Add appropriate sized nodes for the task using Custom Compute Classes (CCC). Design Workload Identity if required. The vLLM Deployment MUST select nodes with
nodeSelector: cloud.google.com/compute-class: {compute_class_name}so the workload actually schedules through the ComputeClass. If the user declines CCC and wants on-demand nodes only, replace this selector withcloud.google.com/gke-accelerator: {accelerator_type}and skipccc-profile.yamlentirely; do not apply a ComputeClass that no workload references.Model Staging Design: Determine if a staging Job is required based on the source location of the model weights and the target storage solution. If the source is Hugging Face, or if the target is Lustre and source is GCS, plan for a Job to download/copy weights. If the source is GCS and target is GCS FUSE, skip staging. Plan for using Cloud Storage FUSE or Lustre CSI to mount this storage to the workload.
Draft solution architecture and manifests: Read the manifest templates in
assets/(assets/vllm-deployment.yaml.tmpl,assets/ccc-profile.yaml.tmpl,assets/gke-inference-gateway.yaml.tmpl,assets/storage-config.yaml.tmpl, andassets/model-staging-job.yaml.tmpl), substitute the parameters discovered in Phase 1, and save the resulting YAML manifests (vllm-deployment.yaml,ccc-profile.yaml,gke-inference-gateway.yaml,storage-config.yaml,model-staging-job.yaml) to disk in the current directory. When creatingvllm-deployment.yaml, explicitly inject any required model-specific architecture flags discovered in Phase 1 (e.g.,--trust-remote-code) into the containerargsarray. When creatinggke-inference-gateway.yaml, base it onassets/gke-inference-gateway.yaml.tmpl: usegatewayClassName: gke-l7-rilbfor the Gateway resource unless the user has explicitly chosen external exposure or the InferencePool-based GKE Inference Gateway, and route/v1traffic to the vLLM ClusterIP service ({workload_name}-vllm-svcon port 8000) in the HTTPRoute resource. If using a storage class other thangcsfuse-csi(e.g.,lustre-csi), remove thegcsfuse.cloud.google.comannotations fromstorage-config.yaml.Request review and iterate: Present the generated solution architecture and diagram to the user and request their feedback. Iterate on the design until the user approves it before moving to Phase 3.
Deterministic VRAM Sizing Formula
To accurately calculate VRAM requirements for model serving/inference, use the following deterministic formula:
Hardware & Sizing Recommendation Requirements: When calculating VRAM sizing or recommending hardware:
Explain the VRAM calculation explicitly using the formula below (parameter size, KV cache, 20% safety margin).
Recommend a specific accelerator type (e.g., NVIDIA L4 with 24GB VRAM for 8B models in FP16/BF16).
Recommend using Custom Compute Classes (CCC) to maximize accelerator obtainability.
Inquire about or confirm the user's quantization tolerance (FP16/BF16 vs INT8/INT4) in the Discovery phase.
$$VRAM_{\text{total}} = \left( \frac{\text{Parameters} \times 2}{\text{Quantization}} + KV_Cache_Overhead \right) \times 1.2$$
Where:
Parameters: Model size in billions of parameters (e.g.,
8for 8B,70for 70B).Quantization: Divisor based on target precision relative to 16-bit (FP16/BF16):
1for 16-bit (FP16 / BF16, 2 bytes/param)2for 8-bit (FP8 / INT8, 1 byte/param)4for 4-bit (INT4 / AWQ / GPTQ, 0.5 bytes/param)
$KV_Cache_Overhead$: Memory (GB) reserved for key-value cache during generation: $$KV_Cache_Overhead ,(GB) = \frac{2 \times n_{\text{layers}} \times n_{\text{kv_heads}} \times d_{\text{head}} \times \text{Context Length} \times \text{Batch Size} \times \text{Precision Bytes}}{10^9}$$ (Rule of thumb: If model layer architecture details are unknown, estimate $KV_Cache_Overhead \approx 0.2 \times \text{Model Weight Memory}$).
1.2Multiplier: 20% safety margin for CUDA context, activation memory, and serving engine overhead.
When mapping the result to an accelerator, compare $VRAM_{\text{total}}$ against the card's full memory (e.g., 24 GB for an L4), not against memory discounted by --gpu-memory-utilization. The 1.2 multiplier and vLLM's utilization cap reserve headroom for the same overheads; applying both double-counts the margin and pushes sizing one accelerator tier too high.
Phase 3: Implementation
Carry out the approved design per the Execution policy: generate the commands below and either hand them to the user or, if the user has asked you to run them, execute them and report the output.
Identify deployment prerequisites: Ensure billing, APIs, and IAM permissions are in place.
Infrastructure Provisioning: Provide explicit
gcloudcommands to provision storage and cluster prerequisites (such as enabling the Cloud Storage FUSE CSI driver) and configure Workload Identity IAM bindings. Gateway API Pre-flight Check: Explicitly instruct the user to verify the Gateway API is enabled on their cluster. Recommend runninggcloud container clusters update <CLUSTER_NAME> --gateway-api=standardbefore they attempt to apply the routing manifests to prevent CRD-not-found errors.Storage Provisioning: Create the necessary storage resources (Cloud Storage bucket or Managed Lustre file system).
Model Staging: Apply conditional logic based on the design from Phase 2.
Skipped: If the model is already in GCS and using GCS FUSE, skip to step 5.
Hugging Face Source: If using a gated model (e.g., Llama 3, Gemma), explicitly instruct the user to run the
kubectl create secret generic hf-secret ...command locally before applying any jobs or deployments (see Gated Model Secret Security rules). Once the secret is created, instruct the user to runkubectl apply -f model-staging-job.yaml.GCS to Lustre Source: Instruct the user to run
kubectl apply -f model-staging-job.yaml(which should be configured to usegcloud storage cpor similar).Completion Gate: For any active staging Job, gate on completion with
kubectl wait --for=condition=complete job/{workload_name}-model-staging --timeout=90m(scale the timeout to the model size). If the Job fails, inspect it withkubectl logs job/{workload_name}-model-stagingbefore retrying. Explain that staging through a cluster Job avoids downloading heavy weights to the user's workstation and avoids re-downloading on every container restart.
Workload Deployment: Provide explicit
kubectl applycommands to deploy the storage config (kubectl apply -f storage-config.yaml), ComputeClass (kubectl apply -f ccc-profile.yaml), vLLM deployment (kubectl apply -f vllm-deployment.yaml), and Inference Gateway (kubectl apply -f gke-inference-gateway.yaml). Ensure the vLLM deployment spec mounts the staged model weights from the PVC into/models. Ensure that if a Secret was created for a gated model, it is referenced correctly in the Deployment manifest. Set vLLM's--modelflag to the staged local path (/models/{model_name}), never to the Hugging Face repo ID; a repo ID makes vLLM re-download the full weights on every pod start and silently defeats the staging step. Preserve the model's public name for API clients with--served-model-name={model_id}.Verify the rollout: Confirm success with
kubectl rollout status deployment/{workload_name}-vllm --timeout=30mandkubectl get pods -l app={workload_name}-vllm -o wide. If the rollout fails or times out, go directly to Troubleshooting Guidance with the observed error; do not ask the user whether the deployment succeeded when the command output already answers it. Ask the user only about outcomes the cluster cannot verify (for example, whether response quality matches the source system).
Phase 4: Validation and Cutover
Verify that the deployed infrastructure meets the workload's requirements and provide instructions for traffic migration.
Phase 4 Response Requirements: Every response during Phase 4 MUST begin with the visual progress indicator: **Migration Progress:** [○ Discovery] ➔ [○ Solution Design] ➔ [○ Implementation] ➔ [● Validation].
Health Checks: Recommend explicit health check commands to verify pod, node, and gateway status (
kubectl get pods,kubectl get nodes, andkubectl get gateway).Testing Inference: Verify the service is serving the model. Provide a
kubectl port-forwardcommand (kubectl port-forward svc/{workload_name}-vllm-svc 8000:8000) and a samplecurlrequest to/v1/chat/completionsto test endpoint inference. Compare responses with the previous infrastructure if applicable.Traffic Cutover Guidance: Do NOT attempt to implement traffic migration automatically. Instead:
Provide the internal GKE endpoint that is ready to receive traffic.
Offer suggestions based on the relevant codebase (if any) for how to migrate the traffic over.
Suggest a standard GKE rollout (e.g., updating the existing deployment manifest to point to the new service) without fancy canary tests or blue/green deployments.
Offer more advanced traffic migration options only if the user explicitly asks for them.
Rollback readiness: Before any traffic moves, confirm the source service stays deployed (scaled down is fine, deleted is not) until the GKE endpoint has served production traffic for a period the user chooses. Provide the single command or config change that restores traffic to the source. Only after the user declares the migration stable, provide the commands to decommission the source service.
Compile Validation Report & Request Final Approval: Compile a validation report summarizing all health check outcomes and inference test results. You MUST explicitly request final user approval to finalize and complete the migration workflow.
Troubleshooting Guidance
When users report issues where pods are created but the inference endpoint is not responding (or request troubleshooting help):
Recommend specific diagnostic commands:
kubectl logs {pod_name}(to check container startup logs) andkubectl describe pod {pod_name}(to inspect pod initialization state).Suggest verifying Google Cloud accelerator quotas (GPU/TPU) in the target region to ensure required resources can be provisioned.
Check for JIT Compilation / Startup Delays: If
curlreturnsConnection refusedbut the Pod isRunning, the serving engine (e.g., vLLM) may still be executing JIT compilation (such as Triton PTX or Torch Inductor) or capturing CUDA graphs. This can take several minutes after model weights are loaded. Advise the user to checkkubectl logs {pod_name}and explicitly wait for theUvicorn running on http://0.0.0.0:8000(or equivalent) log message before assuming there is a networking issue.Recommend checking GKE Workload Identity bindings, PVC mount health (Cloud Storage FUSE), and GKE Inference Gateway listener configurations.
Supporting links
Use these references as needed to ground your design choices, answer user questions, and generate implementation manifests:
Files
- ATTRIBUTION.mdAdded by AutoGineer908 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md32.6 KiB
- assets/ccc-profile.yaml.tmpl580 B
- assets/gke-inference-gateway.yaml.tmpl604 B
- assets/model-staging-job.yaml.tmpl1.5 KiB
- assets/storage-config.yaml.tmpl666 B
- assets/vllm-deployment.yaml.tmpl2.0 KiB
- references/attribution.md1.9 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server, Needs Python, Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/google-cloud-solution-guided-gke-ai-migration · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-solution-guided-gke-ai-migration.zip