gke-storage-troubleshooting
它能做什么
这个技能诊断在 Google Kubernetes Engine 上运行的应用的存储问题。它适用于 Pod 卡住或磁盘表现异常的平台团队。
适用场景
- ✓当 GKE Pod 因卷无法挂接或挂载而停在 ContainerCreating 的时候。
- ✓当磁盘性能或节点存储压力正在拖慢 GKE 工作负载的时候。
- ✓当 GKE 上的 Cloud Storage FUSE 挂载内存不足,或卷扩容失败的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/gke-storage-troubleshooting/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 GKE Pod 因磁盘无法挂载,已经卡在 ContainerCreating 一小时。这是怎么回事?”
每周 5 个新技能,1 分钟读完。
工作原理
它会收集集群、工作负载和卷的详情,然后检查挂接和挂载错误的事件和日志。它会提出清单和设置的修复建议供你审查,而不会直接更改正在运行的资源。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GKE Storage Troubleshooting Skill
Use this skill to systematically diagnose and resolve persistent-storage failures for workloads running on GKE — volume attach/mount errors, disk performance and node storage pressure, volume expansion, storage-related cluster/node-pool creation errors, and Cloud Storage FUSE memory issues. This skill operates non-interactively and enforces a read-only diagnostics boundary before proposing manifest or configuration corrections.
For routine storage provisioning and StorageClass/PVC authoring, use the
gke-storageskill instead. This skill focuses on failure diagnosis.
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-storage-troubleshooting)"
and append agent-skills/1.0 (skill:gke-storage-troubleshooting) to User-Agent headers.
🔍 Diagnosis & Resolution Workflow
Step 0: Non-Interactive Context Discovery & Dry-Run Fallback
Parameter Extraction: Extract required context (
project_id,cluster_name,cluster_location,workload_name,workload_namespace,pod_name, and the relevantpvc_name/pv_name/node_name) non-interactively from the user prompt, activeSETTINGS.md, or environment defaults:- Default
workload_namespacetodefaultif omitted. - Infer missing cluster parameters from the active environment (
kubectl config current-contextorgcloud config get-value project).
- Default
Cluster Credentials & Fallback Mode:
- Attempt credential fetch:
gcloud container clusters get-credentials {cluster_name} --location {cluster_location} --project {project_id}. - Fallback / Dry-Run Mode: If the cluster is unreachable,
non-existent, or live command execution fails (such as in sandboxed
evaluations, dry-run mode, or offline analysis):
- Limit retry attempts to avoid resource exhaustion and context overflow.
- Immediately present the exact
kubectl/gclouddiagnostic commands for the human operator to run. - Synthesize the root-cause analysis and output the proposed GitOps correction based on the reported symptoms.
- Attempt credential fetch:
Step 1: Classify the Storage Symptom
Gather the primary signals, then jump to the matching branch under Step 2 (Resolution) — you normally perform only the one branch that matches your diagnosis, not all of them.
Diagnostic Commands:
kubectl describe pod {pod_name} -n {workload_namespace}
kubectl get pvc,pv -n {workload_namespace}
kubectl get events -n {workload_namespace} --sort-by='.metadata.creationTimestamp'
kubectl describe node {node_name}
- Pod stuck in
ContainerCreatingwith an attach/mount event → Volume Attach & Mount Failures. - Node-level slowness,
PLEG is not healthy, orStoragePressureDetectedevents → Disk Performance & Node Storage Pressure. - Cluster / node-pool creation or provisioning error → Storage Provisioning & Creation Failures.
- A resized volume is not reflected inside the container → Volume Expansion Not Reflecting in the Container.
- Cloud Storage FUSE Pod / sidecar OOM → Cloud Storage FUSE Out-Of-Memory (OOM) Events.
Step 2: Resolution
Perform only the branch that matches your Step 1 diagnosis. These branches are mutually exclusive alternatives, not sequential steps.
Volume Attach & Mount Failures
Error 400: Cannot attach RePD to an optimized VM: Regional persistent disks are restricted from being used with memory-optimized or compute-optimized machine types.- If a regional PD is not a hard requirement, switch the workload to a non-regional persistent disk StorageClass.
- If a regional PD is required, use taints and tolerations so that Pods needing regional PDs are scheduled onto a node pool that does not use optimized machine types.
**Pods stay
Pending/FailedSchedulingafter a node
常见问题
它会设置新存储吗?
不会。日常的配置以及 StorageClass 或 PVC 设置,请使用 gke-storage 技能。
它会更改我的集群吗?
诊断时只读,它只提出修正建议。
它涵盖哪些类型的错误?
区域磁盘挂接问题、fsGroup 挂载超时、Local SSD 和 Hyperdisk 池错误,以及 Cloud Storage FUSE 内存问题。
详情
作者的原始描述
Diagnoses GKE persistent-storage failures — volume attach/mount errors (Regional PD on optimized VMs, fsGroup mount timeouts), disk-performance and node storage-pressure issues, slow-disk Pod-creation failures, volume-expansion problems, Local SSD / Hyperdisk Storage Pool creation errors, and Cloud Storage FUSE OOM. Use when Pods are stuck in ContainerCreating, volumes fail to attach or mount, or nodes report storage pressure. Don't use for routine storage provisioning or StorageClass/PVC authoring (see the gke-storage skill).
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10298
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。