gke-ai-troubleshooting-handle-disruption-gpu-tpu
它能做什么
这个技能调查 GKE 的 GPU 或 TPU 节点上运行的 AI 训练或推理作业为何中断。它适用于运行大量 AI 工作负载、需要减少意外重启的平台团队。
适用场景
- ✓当 GKE 上的 GPU 或 TPU 工作负载因主机维护事件而中断的时候。
- ✓当你想预测或检查 GPU 或 TPU 节点池即将进行的维护的时候。
- ✓当你需要为中断设置优雅终止或其他工作负载保护的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-handle-disruption-gpu-tpu/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我在 GKE 上的 GPU 训练作业不断重启。请检查是否是主机维护导致的,并建议如何保护工作负载。”
每周 5 个新技能,1 分钟读完。
工作原理
在调查之前,它会先询问项目、位置、集群和时间。然后它会检查计划内的维护、节点污点和中断指标,并推荐保护设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Handle Disruption on GPUs and TPUs Troubleshooting
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-handle-disruption-gpu-tpu)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-handle-disruption-gpu-tpu) to User-Agent headers.
🔍 Diagnostic Workflow
Step 0: Context Acquisition
- Mandatory: When a user asks to debug or investigate an actual workload
disruption, node crash, or unexpected restart without providing complete
cluster details, you MUST immediately halt and request all missing mandatory
parameters (
project_id,location,cluster_name,timestamp) BEFORE delivering theories or general diagnostic commands. Only skip context acquisition if the user explicitly requests a generic reusable runbook or provides a complete static telemetry/log dump for offline analysis. - Optional:
node_name,workload_name,workload_namespace,nodepool_name.
Step 1: [Low Risk] Check for Upcoming Scheduled Maintenance
Action: Propose running
kubectlto check if nodes have the scheduled maintenance label indicating an upcoming disruption.Example Command:
kubectl get nodes -l cloud.google.com/scheduled-maintenance-time -L cloud.google.com/scheduled-maintenance-timeInterpretation: The
SCHEDULED-MAINTENANCE-TIMEcolumn shows the Unix epoch time when the VM is scheduled for maintenance. If this label exists, a disruption is guaranteed to occur.
Step 2: [Low Risk] Investigation via Cloud Monitoring (PromQL)
Action: Call any available monitoring tool or provide PromQL for manual verification.
Mandatory Monitoring Rule: Whenever recommending follow-up monitoring or interruption tracking over time, you MUST explicitly present a PromQL query using the metric
kubernetes_io:node_interruption_countfiltered byinterruption_reason="HW/SW Maintenance". Do not suggest general Cloud Monitoring dashboards or Metrics Explorer without providing this specific PromQL metric expression.Example Query:
# Fetch host maintenance events for nodes sum by (interruption_type,interruption_reason)( sum_over_time( kubernetes_io:node_interruption_count{monitored_resource="k8s_node", interruption_reason="HW/SW Maintenance"}[${__interval}]))# See the interruption count aggregated by node pool sum by (node_pool_name,interruption_type,interruption_reason)( sum_over_time( kubernetes_io:node_pool_interruption_count{monitored_resource="k8s_node_pool", interruption_reason="HW/SW Maintenance", node_pool_name="{nodepool_name}" }[${__interval}]))Interpretation: If
kubernetes_io:node_interruption_countshows values > 0 forinterruption_reason="HW/SW Maintenance", it indicates the underlying Compute Engine VM was interrupted due to scheduled host maintenance.
Step 3: [Low Risk] Investigation via Cloud Logging & Node Taints
- Action: Call
query_logsor instruct the user to filter their GKE logs for active host maintenance events, and check node taints. - Guidance: Look for occurrences in Cloud Logging where
cloud.google.com/active-node-maintenanceis set toONGOING. To check if GKE has cordoned the terminating node to prevent new workloads from being scheduled, verify whether thecloud.google.com/impending-node-termination:NoScheduletaint is present (either in GKE event logs or directly viakubectl describe node). - Interpretation:
cloud.google.com/active-node-maintenanceset toONGOINGmeans workloads are actively being stopped by GKE due to host maintenance.cloud.google.com/impending-node-termination:NoScheduletaint means GKE has cordoned the node to prevent new Pods from being scheduled on the terminating node. DO NOT recommend tolerating this taint.
Step 4: Conclusion and Resolution
- Action: Provide a summary of findings to the user and suggest appropriate mitigation strategies if host maintenance events were confirmed or scheduled.
- **Reporting
常见问题
它会先询问细节吗?
会。对于实际中断,它会先询问项目、位置、集群和时间戳,然后再给出建议。
它涵盖 TPU 和 GPU 吗?
涵盖。它同时涵盖 GPU 和 TPU 节点池。
它能推荐哪些设置?
优雅终止以及其他工作负载保护策略。
详情
作者的原始描述
Diagnoses, predicts, and mitigates node disruptions during Compute Engine host maintenance and hardware or software maintenance events for GPU and TPU workloads on GKE. Use when diagnosing node disruptions, predicting host maintenance events on GPU/TPU nodepools, inspecting node interruption PromQL metrics, auditing node taints, or configuring workload protection strategies (graceful termination, opportunistic maintenance, PodDisruptionBudgets). Don't use for general GKE cluster creation, network policy configuration, or non-disruption workload deployment.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10264
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。