| name | llm-d-deploy-stack |
| description | Deploys the llm-d stack on GKE using well-lit paths specification. |
| version | 0.3.1 |
| allowed-tools | kubectl gcloud helm kustomize curl terraform python3 |
| mcp-servers | [{"kubernetes":{"reason":"Inspect cluster info, custom compute classes, pod statuses, and secrets."}},{"gcp":{"reason":"Verify GKE cluster status."}}] |
Deploy llm-d Stack Skill
Follow these instructions to deploy the llm-d benchmarking stack on GKE.
Terminology & Variables
This skill utilizes the following core variables:
1. Prerequisites & Cluster Setup
- Ask the user: "Is there an existing GKE cluster? (yes/no)"
- If NO:
- If YES:
- Verify connectivity to the target cluster:
kubectl cluster-info
- Ask the user: "Is the llm-d stack already deployed on this cluster? (yes/no)"
- If YES:
- Skip to Section 4: Hugging Face Token Setup (we only need to deploy the model server, which is done in Section 5).
- If NO:
- Proceed to Section 2: Configure Model & Accelerator (to configure the deployment variables).
2. Configure Model & Accelerator
- Ask the user: "Which model would you like to run?"
- Allowed Models:
google/gemma-4-31b-it
qwen/qwen3-32b (default)
qwen/qwen3-32b-fp8
redhatai/gemma-4-31b-it-fp8-block
- Validation: If the user inputs anything else, flag it as invalid, display the allowed models, and ask again.
- Ask the user: "Which accelerator would you like to use?"
- Allowed Accelerators:
rtx-pro-6000 (default)
h100 (translates to nvidia-h100)
h200 (translates to nvidia-h200)
v6e (TPU, translates to google-tpu-v6e)
- Validation: If the user inputs anything else, flag it as invalid, display the allowed accelerators, and ask again.
- Update configuration:
3. Select & Deploy Well-Lit Path Guide
-
Ask the user: "Which llm-d well-lit path guide would you like to deploy?"
- Allowed Options:
- Validation: If the user inputs anything else, flag it as invalid, display the list of allowed options, and ask again.
-
Deploy the baseline stack:
Run the deployment script corresponding to the chosen guide to create the cluster (if new) and deploy the baseline infra/services:
- For
optimized-baseline:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-optimized-baseline.sh"
- For
precise-prefix-cache-routing:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-precise-prefix-cache-routing.sh"
- For
predicted-latency-routing:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-predicted-latency-routing.sh"
-
Run validation:
4. Hugging Face Token Setup
-
Instruct the user to add their Hugging Face Read Token to Google Secret Manager and as a Kubernetes secret:
Provide them with these commands, replacing <YOUR_HUGGINGFACE_READ_TOKEN> with their actual token. Note that the source command must be run in the same shell session as the subsequent commands so the environment variables are preserved:
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
HF_TOKEN_READ=<YOUR_HUGGINGFACE_READ_TOKEN>
echo ${HF_TOKEN_READ} | gcloud secrets versions add ${huggingface_hub_access_token_read_secret_manager_secret_name} --data-file=- --project=${huggingface_secret_manager_project_id}
kubectl -n ${llmd_namespace} create secret generic llm-d-hf-token --from-literal=HF_TOKEN="${HF_TOKEN_READ}"
-
WAIT: Stop calling tools and ask the user to confirm once they add the HF token to secret manager and kubernetes secret Do not proceed until the user confirms.
5. Deploy Model Download Job & Model Server
Once the user confirms the token is configured, proceed with the deployment:
- Deploy the model download job:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/model-download/configure_huggingface.sh"
kubectl apply --kustomize "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/model-download/huggingface"
- Wait for download to complete:
Monitor the job:
kubectl get job -n ${huggingface_hub_downloader_kubernetes_namespace_name}
Wait until the job status shows Complete.
- Clean up the download job:
Once the download is complete, delete the job to free up GKE resources:
kubectl delete job -n ${huggingface_hub_downloader_kubernetes_namespace_name} ${HF_MODEL_ID_HASH}-hf-model-to-gcs
- Deploy the Model Server:
- Configure the model server (run the script for GPU or TPU as indicated by the chosen accelerator):
- If GPU:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-gpu/llmd-<spec>/vllm/configure_vllm.sh"
- If TPU:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-tpu/llmd-<spec>/vllm/configure_vllm.sh"
- Deploy using the appropriate overlay directory. Construct the directory path as:
platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-[gpu|tpu]/llmd-[spec]/vllm/[prefix]-[suffix]
[gpu|tpu]: Use tpu if the accelerator is v6e, otherwise gpu.
[spec]: The well-lit path chosen in Section 3.
[prefix]: The accelerator prefix (e.g., rtx-pro-6000, h100, , ).
6. Verification
- Check that all pods are running and services are accessible. (Note: You may need to source the environment variables script first to get
$llmd_namespace):
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl get pods -n ${llmd_namespace}
kubectl get svc -n ${llmd_namespace}
- Verify the model downloader job has completed and the model files are in the GCS bucket:
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl get jobs -n ${llmd_namespace}
gcloud storage ls gs://${huggingface_hub_models_bucket_name}/${llmd_model_id}/
- Ensure the Hugging Face token is securely configured:
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl describe secretProviderClass huggingface-tokens -n ${llmd_namespace}
kubectl describe secret llm-d-hf-token -n ${llmd_namespace}