gke-ai-troubleshooting-handle-disruption-gpu-tpu
できること
GKEのGPUやTPUのノードで動くAIの学習や推論のジョブが、なぜ中断されるかを調べます。予期しない再起動を減らしたいAIワークロードのプラットフォームチーム向けです。
使う場面
- ✓GKEのGPUやTPUのワークロードが、ホストのメンテナンスのイベントで中断されているとき。
- ✓GPUやTPUのノードプールで、今後のメンテナンスを予測または確認したいとき。
- ✓中断に備えて、Graceful terminationなどのワークロードの保護を設定したいとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-handle-disruption-gpu-tpu/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。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の両方のノードプールに対応しています。
どんな設定を推奨しますか?
Graceful terminationやそのほかのワークロード保護の方法です。
詳細
作者による元の説明
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コマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。