Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)22k · #10265

gke-ai-troubleshooting-jobset-interruption

Skill này làm gì

Skill này điều tra các job huấn luyện AI và machine learning bị gián đoạn chạy dưới dạng JobSet trên Google Kubernetes Engine. Skill dành cho các đội mà các lần huấn luyện lớn liên tục lỗi hoặc khởi động lại.

Khi nào nên dùng

  • ✓Khi một job huấn luyện JobSet trên GKE bị kẹt trong vòng lặp khởi động lại.
  • ✓Khi các VM spot bị preempt và làm dừng một khối lượng công việc huấn luyện AI.
  • ✓Khi lỗi sẵn sàng của node hoặc sự cố worker điều phối làm dừng một JobSet.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-jobset-interruption/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/gke-ai-troubleshooting-jobset-interruption/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Lần huấn luyện JobSet trên GKE của tôi liên tục khởi động lại. Tìm xem có phải do VM spot bị preempt hay sự cố node không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill dùng dữ liệu cụm và giám sát trong khoảng thời gian của khối lượng công việc để tìm nguyên nhân mỗi lần khởi động lại. Sau đó skill đi qua các bước chẩn đoán và báo cáo phát hiện cùng cách sửa.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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-metrics for 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

  1. 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.
  2. Window Calculation: If a timestamp {issue_time} is available (or calculated as T), set {start_time} = T - 30m and {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

Câu hỏi thường gặp

Skill có bao gồm các sự cố GKE ứng dụng chung không?

Không. Skill chỉ bao gồm gián đoạn JobSet, không bao gồm sự cố ứng dụng hay cụm nói chung.

Cần bật gì trước?

Các chỉ số JobSet trong kube-state-metrics, cùng Cloud Logging và Cloud Monitoring cho dự án.

Nếu bị từ chối truy cập thì sao?

Skill không bị kẹt ở phần thông tin xác thực. Nó dùng dữ liệu đang có để hoàn tất chẩn đoán.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10265
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự