gke-ai-troubleshooting-jobset-interruption
できること
Google Kubernetes Engine上でJobSetとして動くAIや機械学習の学習ジョブが中断される理由を調べます。大きな学習が何度も失敗したり再起動したりするチーム向けです。
使う場面
- ✓GKEのJobSetの学習ジョブが、再起動のループに陥っているとき。
- ✓スポットVMがプリエンプトされ、AIの学習ワークロードが止まっているとき。
- ✓ノードの準備の失敗や、コーディネーターのワーカーのクラッシュにより、JobSetが止まっているとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-jobset-interruption/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“GKEのJobSetの学習ジョブが再起動し続けます。スポットVMのプリエンプションまたはノードの問題が原因かを調べてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ワークロードの時間帯のクラスタとモニタリングのデータを使い、再起動それぞれの原因を見つけます。そのうえで、診断の手順を進め、結果と修正を報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
GKE JobSet Interruption Troubleshooting
Use this skill to systematically diagnose and resolve JobSet interruptions, restarts, and preemptions on GKE clusters hosting large-scale AI/ML workloads.
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-jobset-interruption)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-jobset-interruption) to User-Agent headers.
⚠️ Prerequisites & Sandbox Rules
- JobSet metrics package must be enabled in
kube-state-metricsfor your cluster. - Cloud Logging and Cloud Monitoring enabled for the Google Cloud Project.
- Autonomous & Sandbox Execution Rule: If API queries, tools, or commands
encounter
403 Permission Denied, authentication errors, or network isolation, do NOT enter authentication or credential troubleshooting loops. Populate the query templates with the acquired variables ({project_id},{cluster_name},{workload_name},{start_time},{end_time}), inspect any locally staged telemetry or mock data files if available, and complete the diagnostic workflow and resolution recommendations autonomously.
🔍 Diagnostic Workflow
Step 0: Context Acquisition & Time Window Definition
Independently gather context using tools, workspace files, environment details, or user prompt context:
- Project ID (
{project_id}) - Cluster Name (
{cluster_name}) - Workload Name (JobSet Name) (
{workload_name}) - Workload Namespace (
{namespace}) - Issue Time (
{issue_time})
If specific variables are not explicitly provided by the user, inspect cluster
resources or logs to determine them, or use the {variable} placeholders
provided.
Time Handling Rules
- Autonomous Time Window: If a relative time (e.g., "X minutes ago") or no exact timestamp is provided, calculate the query window based on current time or available log timestamps.
- Window Calculation: If a timestamp
{issue_time}is available (or calculated asT), set{start_time}=T - 30mand{end_time}=T + 30m.
Step 1: Identify JobSet Restarts and Attempts [Low Risk]
Verify if the JobSet is experiencing restart loops and determine the frequency of restarts.
Visual Chart / MQL Query - restarts
MQL Query Specification:
fetch prometheus_target | metric 'prometheus.googleapis.com/kube_jobset_restarts/gauge' | filter resource.cluster_name == '{cluster_name}' && metric.jobset_name == '{workload_name}' | align next_older(1m) | every 1m | group_by [metric.jobset_name], [val: max(value)]
PromQL Metric Query - restarts
PromQL Query Specification:
kube_jobset_restarts{jobset_name="{workload_name}", cluster="{cluster_name}"}Diagnostic Logic: A non-zero or increasing value for restarts indicates that the JobSet is being actively restarted by the controller due to worker failure or interruption.
Automation: Proceed to Step 2 automatically after reporting findings.
Step 2: Inspect Nodepool Interruptions [Low Risk]
Determine if the JobSet restarts were triggered by physical nodepool-level events (such as spot preemptions, maintenance, or host terminations).
A. Metrics Query (Nodepool Interruption Counts)
Visual Chart / MQL Query - interruptions
MQL Query Specification:
fetch k8s_node_pool | metric 'kubernetes.io/node_pool/interruption_count' | filter cluster_name == '{cluster_name}' | align next_older(10m) | every 10m | group_by [metric.interruption_type, metric.interruption_reason, metadata.system.node_pool_name], [val: sum(value)]
PromQL Query - interruptions
PromQL Query Specification:
sum by (interruption_type, interruption_reason, node_pool_name, cluster_name) ( avg_over_time(kubernetes_io:node_pool_interruption_count{cluster_name="{cluster_name}"}[10m]) )
B. Log Qu
よくある質問
一般のGKEのアプリの問題も扱いますか?
いいえ。JobSetの中断だけを扱い、一般のアプリやクラスタの問題は扱いません。
先に何を有効にする必要がありますか?
kube-state-metricsのJobSetのメトリクスと、プロジェクトのCloud LoggingおよびCloud Monitoringです。
アクセスが拒否されたらどうしますか?
認証情報で止まらず、手元のデータを使って診断を完了させます。
詳細
作者による元の説明
Diagnoses GKE JobSet interruptions, restarts, and preemptions for AI/ML training workloads autonomously. Use when troubleshooting JobSet restart loops, spot VM preemptions, node readiness failures, host VM issues, or coordinator worker crashes. Don't use for general GKE cluster creation, basic workload deployment, or non-JobSet application issues.
repo: google/skills
人気
- GitHubのスター
- 22k
- ランキング
- #10265
- ライセンス
- 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一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。