vllm-deploy-k8s
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "vllm-deploy-k8s":https://skillpi.com/zh/skills/deepskill-74fd6e19568ea43eae67c83626f945c60096bfc156b29ed6e4f7f062704c8947。安装前核对上游来源和版本:https://github.com/vllm-project/vllm-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
将 vLLM 部署到 Kubernetes (K8s),支持 GPU、健康检查探针并提供兼容 OpenAI 的 API 端点。用于在 Kubernetes 集群上创建、运行或管理 vLLM 服务,包括部署和服务管理。
介绍来源: third_party · vllm-project · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: vllm-deploy-k8s
description: Deploy vLLM to Kubernetes (K8s) with GPU support, health probes, and OpenAI-compatible API endpoint. Use this skill whenever the user wants to deploy, run, or serve vLLM on a Kubernetes cluster, including creating deployments, services, checking existing deployments, or managing vLLM on K8s.vLLM Kubernetes Deployment
A Claude skill for deploying vLLM to Kubernetes using YAML templates. Deploys a vLLM OpenAI-compatible server as a Kubernetes Deployment with a ClusterIP Service, GPU resources, and health probes.
What this skill does
- Deploy vLLM as a Kubernetes Deployment + Service with NVIDIA GPU support
- Check if a vLLM deployment already exists before deploying
- Check if the Hugging Face token secret exists, and ask the user for their token if not
- Use the
vllm/vllm-openai:latestimage by default (user can specify a different version) - Provide sensible default configuration that users can customize (model, replicas, GPU count, extra vLLM flags, etc.)
Prerequisites
kubectlconfigured with access to a Kubernetes cluster- NVIDIA GPU Operator or device plugin installed on cluster nodes
- Hugging Face token (required for gated models like Llama, optional for public models)
Deployment Steps
Step 1: Check HF token secret
Before deploying, check if the hf-token Kubernetes secret exists in the target namespace:
kubectl get secret hf-token -n <namespace>
- If the secret exists: proceed to Step 2.
- If the secret does not exist: ask the user to provide their Hugging Face token, then create the secret:
kubectl create secret generic hf-token --from-literal=HF_TOKEN="<user-provided-token>" -n <namespace>
This is required for gated models (e.g., meta-llama/Meta-Llama-3.1-8B). For public models, the secret is optional but recommended to avoid rate limits.
Step 2: Check if deployment already exists
Before applying, check if a vLLM deployment already exists:
kubectl get deployment vllm -n <namespace>
- If it exists: inform the user that the deployment already exists. Show the current image and status. Ask the user if they want to update it or skip.
- If it does not exist: proceed to deploy.
Step 3: Deploy
Apply the template YAML files to deploy vLLM:
kubectl apply -f templates/vllm-service.yaml -n <namespace>
kubectl apply -f templates/vllm-deployment.yaml -n <namespace>
Step 4: Wait and verify
Wait for the deployment to roll out:
kubectl rollout status deployment/vllm -n <namespace> --timeout=600s
Verify the pod is running and ready:
kubectl get pods -n <namespace> -l app=vllm
Confirm the pod shows READY 1/1 and STATUS Running. If the pod is not ready yet, wait and check again. If it's in CrashLoopBackOff or Error, check the logs with kubectl logs -n <namespace> -l app=vllm.
Step 5: Print deployment summary
Once the pod is ready, print a summary message to the user in this format (replace placeholders with actual values):
🎉 **vLLM Deployment Successful!**
| Resource | Name | Status |
|----------|------|--------|
| Deployment | <deployment-name> | <ready>/<total> Ready |
| Service | <service-name> | ClusterIP:<port> |
| Pod | <pod-name> | Running |
| Image | <image> | |
| Model | <model> | |
**To test the API, run these two commands in your terminal:**
**1. Open a port-forward** (this connects your local port <port> to the vLLM service inside the cluster):
kubectl port-forward svc/vllm-svc <port>:<port> -n <namespace>
**2. In a separate terminal**, send a test request to the OpenAI-compatible API:
curl -s http://localhost:<port>/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"<model>","messages":[{"role":"user","content":"Hello!"}],"max_tokens":50}' | python3 -m json.tool
If everything is working, you'll get a JSON response with the model's reply.
Default Configuration
The templates use the following defaults:
| Parameter | Default Value |
|---|---|
| Image | vllm/vllm-openai:latest |
| Model | Qwen/Qwen2.5-1.5B-Instruct |
| Port | 8000 |
| Replicas | 1 |
| GPU count | 1 |
| GPU memory utilization | 0.85 |
| Tensor parallel size | 1 |
| CPU request / limit | 12 / 128 |
| Memory request / limit | 100Gi / 400Gi |
| Shared memory (dshm) | 80Gi |
Customization
When the user requests changes, modify the template YAML files before applying. The following can be customized:
- Image version: Change
image: vllm/vllm-openai:<version>intemplates/vllm-deployment.yaml(default:latest). Use a specific version tag likev0.17.1if the user requests it. - Model: Change the model name in the
vllm servecommand inside the Deploymentargs. - Extra vLLM flags: Append additional flags to the
vllm servecommand in the Deploymentargs(e.g.,--max-model-len 4096,--kv-cache-dtype fp8,--enforce-eager,--generation-config vllm). - Replicas: Change
replicas:in the Deployment spec. - GPU count: Change
nvidia.com/gpuin bothrequestsandlimitsunder resources. - Tensor parallel size: Change
--tensor-parallel-sizeflag to match the GPU count. - CPU/Memory resources: Change
cpuandmemoryvalues underrequestsandlimits. - Port: Change
containerPortin the Deployment,port/targetPortin the Service, theportin all health probes (liveness, readiness, startup), AND add--port <port>to thevllm servecommand in args. All four must match. - Namespace: Apply to a specific namespace using
-n <namespace>. - Shared memory size: Change the
sizeLimitof thedshmemptyDir volume.
Edit the template files using the Edit tool, then apply the modified templates.
Status Check
kubectl get deployment,svc,pods -n <namespace> -l app=vllm
Cleanup
When the user asks to clean up or delete the vLLM deployment, run the following steps:
- Delete the Deployment and Service:
kubectl delete -f templates/vllm-deployment.yaml -n <namespace>
kubectl delete -f templates/vllm-service.yaml -n <namespace>
- Ask the user if they also want to delete the HF token secret. If yes:
kubectl delete secret hf-token -n <namespace>
- Verify everything is cleaned up:
kubectl get deployment,svc,pods -n <namespace> -l app=vllm
- Print a summary message to the user:
vLLM deployment has been cleaned up from namespace <namespace>.
Deleted: Deployment/vllm, Service/vllm-svc
HF token secret: <kept/deleted>
Troubleshooting
- Pod stuck in Pending: No GPU nodes available. Check
kubectl describe pod <pod-name>for scheduling errors. Ensure NVIDIA GPU Operator or device plugin is installed. - Pod OOMKilled: Increase
memorylimits in the Deployment, or use a smaller model. - ImagePullBackOff: Check the image name and tag. Verify the node has access to Docker Hub / the container registry.
- Startup probe failures (CrashLoopBackOff): Model download may be slow. Check logs with
kubectl logs <pod-name>. Ensurehf-tokensecret exists for gated models. IncreasefailureThresholdon the startup probe if needed. - HF_TOKEN not working: Verify the secret exists:
kubectl get secret hf-token -n <namespace>. Check the token is valid. - GPU not detected in container: Ensure
nvidia.com/gpuresource is requested and the NVIDIA device plugin is running on the node.
References
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供在 Kubernetes 上部署 vLLM 的完整端到端流程,支持 GPU 和健康检查
- 涵盖部署、状态检查、清理和故障排查,实用性强
亮点
- 触发场景描述清晰,覆盖部署、运行、管理 vLLM 等多种操作
- 边界明确,用户能准确判断何时使用此技能
待提升项
-
引用文件缺失 原报告严重程度:重大
SKILL.md 中多次引用 templates/vllm-deployment.yaml 和 templates/vllm-service.yaml 文件,但 ZIP 包中未提供这些文件
改进建议:请补充 templates/vllm-deployment.yaml 和 templates/vllm-service.yaml 文件,或明确说明用户需自行创建
亮点
- 文档结构完整,步骤清晰,包含 prerequisites、deployment steps、customization 和 troubleshooting
- 提供了详细的命令示例和配置说明
待提升项
-
关键资源缺失导致执行断层 原报告严重程度:重大
未提供实际 YAML 模板文件,用户无法直接执行 kubectl apply -f templates/... 命令
改进建议:请补充 templates/vllm-deployment.yaml 和 templates/vllm-service.yaml 文件,或在文档中提供完整的 YAML 内容供用户复制
亮点
- 覆盖了主要异常场景(HF token 缺失、部署已存在、Pod 状态异常等)
- 提供了详细的故障排查指南和清理流程
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- docs.nvidia.com
- docs.vllm.ai
- hub.docker.com
- kubernetes.io
- localhost
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。