Gke Storage Troubleshooting
GoogleOfficialPublished by Google
- Skill
- Review and audit
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured, non-interactive diagnostic workflow for troubleshooting persistent storage issues in GKE. It covers common failure modes including volume attachment and mounting errors, disk performance bottlenecks, node storage pressure, volume expansion discrepancies, and Cloud Storage FUSE memory issues. The skill enforces a read-only diagnostic boundary, guiding the user to identify root causes through standard Kubernetes and gcloud commands, and provides actionable GitOps-ready configuration corrections rather than performing live mutations.
What it does
- Diagnoses volume attach and mount failures, including machine-type incompatibilities.
- Identifies causes of node-level storage pressure and disk performance degradation.
- Troubleshoots GKE cluster and node-pool storage provisioning errors.
- Resolves issues where volume expansion is not reflected in the container filesystem.
- Analyzes Cloud Storage FUSE OOM events using Cloud Profiler and Logging.
- Generates GitOps-ready configuration patches for StorageClasses and PodSpecs.
When to use it
- When Pods are stuck in ContainerCreating due to volume attachment or mounting issues.
- When nodes report StoragePressureDetected or PLEG health warnings.
- When persistent volumes fail to expand or reflect size changes inside containers.
- When encountering resource exhaustion errors during node-pool or storage-pool creation.
- When debugging OOM kills related to the Cloud Storage FUSE CSI driver.
Advantages
- Systematic, non-interactive diagnostic approach prevents accidental configuration changes.
- Provides clear, actionable remediation steps for complex GKE storage scenarios.
- Enforces a read-only boundary, ensuring all changes are reviewed via GitOps pipelines.
- Helps distinguish between capacity issues and machine-type/disk-type incompatibilities.
Usage examples
- “My pod is stuck in ContainerCreating with a volume mount error. Can you help?”
- The agent will extract the pod and namespace context, run diagnostic commands to check events and PVC status, and identify if the issue is due to fsGroup timeouts or machine-type incompatibilities.
- “The node is reporting StoragePressureDetected. How do I fix it?”
- The agent will analyze node storage metrics, identify if the pressure is caused by emptyDir usage or log accumulation, and suggest adjustments to ephemeral storage requests or boot disk configurations.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/gke-storage-troubleshooting/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gke-storage-troubleshooting.zip -d .agents/skills
Documentation by Google
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).
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.
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 pool is moved to a 4th-generation (N4, N4A, N4D) machine series while the workload uses a Persistent Disk StorageClass: N4/N4A/N4D machines do not support Persistent Disk (they support Hyperdisk only), so a PVC bound to apd-*StorageClass cannot bind or schedule on those nodes. Events typically showFailedSchedulingwith a volume node-affinity / topology conflict.Switch the workload to a Hyperdisk StorageClass (for example
type: hyperdisk-balanced) for the Gen4 node pool.For existing Persistent Disk volumes, migrate the data to a Hyperdisk volume; the original PD cannot be attached to a Gen4 node.
If the workload must keep Persistent Disk, keep it on a PD-capable machine series (for example N2) via node selection. This is a machine-type/disk-type incompatibility, not a capacity problem, so increasing disk size or quota does not help.
Hyperdisk Pods become unschedulable when a compute class falls back across VM generations (for example N4 priority, N2 fallback), or one StorageClass must serve mixed generations: a single static disk type in the StorageClass is not compatible with every machine series in the fallback list, so Pods cannot bind their volume on the fallback nodes.
Use automated disk type selection: set the StorageClass
parameters.typetodynamicwithhyperdisk-type,pd-type, anddisk-type-preference, plususe-allowed-disk-topology: "true", so GKE selects a compatible disk type per node and schedules Pods only onto nodes that support it. One dynamic StorageClass can then span multiple VM generations (requires the GKE versions noted in the docs).Example dynamic StorageClass (GKE 1.35.3-gke.1290000+):
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: dynamic-volume provisioner: pd.csi.storage.gke.io volumeBindingMode: WaitForFirstConsumer allowVolumeExpansion: true parameters: type: dynamic pd-type: pd-balanced hyperdisk-type: hyperdisk-balanced # Preferred storage on nodes that support both PD and Hyperdisk; # defaults to hyperdisk-type when omitted. disk-type-preference: hyperdisk-type # Best practice: schedule Pods only onto nodes that support the disk type. use-allowed-disk-topology: "true"
Mount stops responding due to the
fsGroupsetting: A Pod configured with asecurityContext.fsGroupon a volume that contains a large number of files makes the kubelet recursively change ownership on every file, which can time out the mount. The symptom is:Unable to attach or mount volumes for pod; skipping pod ... timed out waiting for the conditionConfirm by checking the Pod logs for a
Setting volume ownership for ... and fsGroup setentry, then apply one of:Reduce the number of files in the volume.
Set
securityContext.fsGroupChangePolicy: OnRootMismatchso ownership is only changed when the top-level permissions do not match.Stop using the
fsGroupsetting if it is not required.
Disk Performance & Node Storage Pressure
Poor disk performance (symptoms such as
task dockerd:... blocked for more than 300 seconds,PLEG is not healthy, or slowfs: disk usagescans): the node boot disk is shared across the OS, container images, the overlay filesystem, and disk-backedemptyDirvolumes, and performance is shared across all disks of the same type on the node.This commonly affects nodes using standard persistent disks smaller than 200 GB. Increase the disk size or switch to SSD, especially for production.
Enable Local SSD for ephemeral storage on node pools whose workloads frequently use
emptyDir.
Slow disk operations cause Pod creation failures: on affected node versions (GKE 1.18–1.23 before the fixed patch releases), the
k8s_node container-runtimelogs showfailed to reserve container name ... is reserved for ...(containerd issue #4604).Mitigate with
restartPolicy: AlwaysorOnFailurein the PodSpec, and increase boot-disk IOPS (larger disk or a faster disk type).The permanent fix is containerd 1.6.0+; upgrade to a GKE version that includes it.
StoragePressureDetected(high node storage pressure): node conditionStoragePressureRootFileSystembecomesTrue(for example,Disk /dev/nvme0n1 usage 89% exceeds threshold 85%), caused by excessiveemptyDirwrites, large image pulls, or accumulating logs.Identify usage with
df -hon the affected node (focus on/mnt/stateful_partitionand ephemeral mounts).Remediate by using larger boot disks, adding Local SSDs for ephemeral storage, setting appropriate
ephemeral-storagerequests/limits, and cleaning up unused files/images/logs.
Storage Provisioning & Creation Failures
The selected machine type ... has a fixed number of local SSD(s): the Local SSD count specified inEphemeralStorageLocalSsdConfig/LocalNvmeSsdBlockConfigdoes not match the fixed count included with the machine type.Specify a Local SSD count that matches the machine type. For third-generation machine series, omit the Local SSD
countflag and the correct value is configured automatically.
Hyperdisk Storage Pools: cluster or node-pool creation fails with
ZONE_RESOURCE_POOL_EXHAUSTED(or similar Compute Engine resource errors): the target zone lacks capacity for the requested Hyperdisk Balanced disks or machine type.Select a new zone in the same region that has capacity and where Hyperdisk Balanced Storage Pools are available. Because storage pools are zonal, delete and recreate the pool in the new zone, then create the cluster/node pool there.
Volume Expansion Not Reflecting in the Container
Volume expansion must always be driven through the PersistentVolumeClaim. Editing the PersistentVolume directly can leave the container filesystem on the old size.
Keep the modified PersistentVolume object as it is.
Edit the PersistentVolumeClaim and set
spec.resources.requests.storageto a value higher than the current PersistentVolume size.The kubelet then resizes the PV, PVC, and container filesystem automatically. Verify inside the Pod:
kubectl exec {pod_name} -n {workload_namespace} -- df -h
Cloud Storage FUSE Out-Of-Memory (OOM) Events
If Pods experience high memory use or OOM kills related to the Cloud Storage FUSE CSI driver:
Enable CPU/memory snapshots by configuring Cloud Profiler on the Cloud Storage FUSE CSI driver sidecar container.
Locate the OOM event in Cloud Logging, filtering by Pod:
jsonPayload.involvedObject.name="{pod_name}" jsonPayload.involvedObject.kind="Pod" OOMKilledIf the sidecar mounter or GCSFuse process OOMs, the Pod name is the workload Pod's name; if the node driver OOMs, it is
gcsfusecsi-node-*.Extract the Pod UID (
jsonPayload.involvedObject.uid) and timestamp, then analyze the matching snapshot in Cloud Profiler using the{pod_name}_{pod_uid}Service Version at the OOM timestamp.
Step 3: Propose the GitOps Correction
Enforce the read-only diagnostics boundary: do not apply live mutations with
kubectl edit, kubectl patch, or kubectl apply. Instead, present the
corrected StorageClass, PersistentVolumeClaim, PodSpec (securityContext,
restartPolicy), or node-pool configuration as a reviewable patch to be applied
through the user's GitOps pipeline (for example, Config Sync, Argo CD, or Flux).
References
Files
- ATTRIBUTION.mdAdded by AutoGineer872 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md14.1 KiB
- references/attribution.md1.9 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/gke-storage-troubleshooting · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-storage-troubleshooting.zip