跳到正文
Skillpedia
部署与云(DevOps)22k · #10272

gke-ai-troubleshooting-tpu-reservation-stockout

它能做什么

这项技能帮助 AI 智能体诊断 TPU 节点池创建或扩容时的错误,例如 GCE_STOCKOUT。适合那些 TPU 预留看似已满、但理应还有空间的团队。

适用场景

  • ✓当创建 TPU 节点池因 GCE_STOCKOUT 或 ZONE_RESOURCE_POOL_EXHAUSTED 而失败时。
  • ✓当 TPU 节点池扩容失败,但目标预留理应还有空闲位置时。
  • ✓当你有处于 NotReady 状态、且已关闭自动修复的 TPU 节点池,可能仍占用预留容量时。

技能链接

https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-reservation-stockout/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-tpu-reservation-stockout/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“为什么我的 TPU 节点池会因 GCE_STOCKOUT 失败,而我的预留按理说还有剩余空间?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把预留的总数和已使用的槽位,与新节点池所需的节点数进行比较,并检查是否仍有占用容量的不健康节点池。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Troubleshoot GKE TPU reservation stockouts caused by leaked node pool capacity

Use this skill to diagnose and resolve GKE TPU node pool creation or scale-up failures that fail with GCE_STOCKOUT, ZONE_RESOURCE_POOL_EXHAUSTED, or ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS (or queue due to lack of capacity) even though they target a specific Compute Engine TPU reservation.

If node auto-repair is disabled on an existing TPU node pool, GKE doesn't repair its nodes when they become NotReady. While their VMs are still running, they keep consuming slots in the reservation (inUseCount is the number of running instances that consume the reservation). Per Ensure reservation availability, the reservation must have sufficient available TPU chips at the time of node pool creation, and per Multi-host TPU slice node pools, if GKE is unable to deploy one node in a slice, no nodes in the TPU slice node pool are deployed. When the free slots in the reservation (specificReservation.count - specificReservation.inUseCount; see Consumable instances in a reservation) are fewer than the number of nodes that the new TPU node pool needs, creation fails with GCE_STOCKOUT or ZONE_RESOURCE_POOL_EXHAUSTED (or queues due to lack of capacity).

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-tpu-reservation-stockout)" and append agent-skills/1.0 (skill:gke-ai-troubleshooting-tpu-reservation-stockout) to User-Agent headers.

Prerequisites

  • Required IAM Roles:
    • Logs Viewer (roles/logging.viewer): Query Cloud Audit Logs in Cloud Logging.
    • Monitoring Viewer (roles/monitoring.viewer): Query GKE node readiness metrics in Cloud Monitoring.
    • Kubernetes Engine Viewer (roles/container.viewer): Inspect GKE node pools (management.autoRepair), cluster operations, and node conditions.
    • Compute Viewer (roles/compute.viewer): Inspect Compute Engine reservation utilization (specificReservation.inUseCount vs specificReservation.count), consuming instances, and VM labels (including in the reservation's owner project if using a shared reservation).
    • For remediation ([High Risk] steps): Kubernetes Engine Cluster Admin (roles/container.clusterAdmin)
  • API Enablement & Billing:
    • Ensure the target project has an active Google Cloud billing account attached: gcloud billing projects describe {project_id}.
    • Enable required APIs: container.googleapis.com, compute.googleapis.com, logging.googleapis.com, and monitoring.googleapis.com.
  • CLI & Authentication Setup:
  • Cluster mode: This skill applies to Standard clusters. Autopilot clusters always auto-repair nodes, and you can't turn this off (see Settings for Autopilot and Standard).
  • Reference Documentation:
    • Auto-repair nodes (Sections: "Settings for Autopilot and Standard", "Repair criteria", "Node repair process", "Verify node auto-repair is enabled for a Standard node pool", "Node auto repair in TPU slice nodes", "Enable auto-repair for an existing Standard node pool", "Get information about recent automated repair events")
    • Troubleshoot GKE Standard node pools (Sections: "Issue: Node pool creation fails due to insufficient resources")
    • Troubleshoot TPUs in GKE (Sections: "How GKE handles capacity issues", "Insufficient TPU resources to satisfy the TPU request")
    • About TPUs in GKE (Sections
常见问题

空闲槽位检查比较的是什么?

它比较预留数量减去已使用数量,再与新节点池所需的节点数进行对比。

为什么损坏的节点池会占用容量?

如果自动修复已关闭,处于 NotReady 状态的节点所在的虚拟机会继续运行,并仍然占用预留槽位。

如果我不使用预留,它还有帮助吗?

这项技能针对特定的 Compute Engine TPU 预留,因此可能不适用于其他情况。

详情

作者的原始描述

Diagnose and resolve cluster-wide GKE TPU node pool creation or scale-up failures caused by Compute Engine reservation stockouts (GCE_STOCKOUT, ZONE_RESOURCE_POOL_EXHAUSTED) when existing unhealthy or NotReady TPU node pools in the cluster have node auto-repair disabled and hold reserved TPU capacity. Use when TPU node pool creation or scale-up fails with GCE_STOCKOUT, ZONE_RESOURCE_POOL_EXHAUSTED, or ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS despite having a specific Compute Engine TPU reservation. Don't use for general pod scheduling without a TPU reservation or workload-level container cras

repo: google/skills

热度

GitHub 星标
22k
排名
#10272
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能