Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
gke-ai-troubleshooting-handle-disruption-gpu-tpu【部署与运维】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 worklo…
独立 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.