Diagnoses, predicts, and mitigates node disruptions during Compute Engine host maintenance and hardware or software maintenance events for GPU and TPU workloads
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-gke-ai-troubleshooting-handle-disruption-gpu-tpu-668b609da33d ,按照其中的说明把「gke-ai-troubleshooting-handle-disruption-gpu-tpu」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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.node_name, workload_name, workload_namespace,
nodepool_name.Action: Propose running kubectl to 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-time
Interpretation: The SCHEDULED-MAINTENANCE-TIME column shows the Unix
epoch time when the VM is scheduled for maintenance. If this label exists, a
disruption is guaranteed to occur.
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_count filtered by
interruption_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_count shows
values > 0 for interruption_reason="HW/SW Maintenance", it indicates the
underlying Compute Engine VM was interrupted due to scheduled host
maintenance.
query_logs or instruct the user to filter their GKE logs
for active host maintenance events, and check node taints.cloud.google.com/active-node-maintenance is set to ONGOING. To check if
GKE has cordoned the terminating node to prevent new workloads from being
scheduled, verify whether the
cloud.google.com/impending-node-termination:NoSchedule taint is present
(either in GKE event logs or directly via kubectl describe node).cloud.google.com/active-node-maintenance set to ONGOING means
workloads are actively being stopped by GKE due to host maintenance.cloud.google.com/impending-node-termination:NoSchedule taint means GKE
has cordoned the node to prevent new Pods from being scheduled on the
terminating node. DO NOT recommend tolerating this taint.spec.terminationGracePeriodSeconds (up to 60 minutes) to
handle the SIGTERM signal before node shutdown.PodDisruptionBudget to maintain minAvailable replicas during
evictions and disruptions.