{"data":{"slug":"github-google-skills-skills-cloud-gke-storage-troubleshooting-d901de7e8a9d","title":"GKE Storage Troubleshooting","summary":"Diagnose and resolve persistent-storage failures on GKE, including volume attach\/mount errors, disk performance issues, and node storage pressure. This skill provides actionable steps for troubleshooting specific storage-related issues such as Pods stuck in ContainerCreating, volume expansion problems, and Cloud Storage FUSE OOM events.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-troubleshooting-d901de7e8a9d","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-gke-storage-troubleshooting-d901de7e8a9d","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-troubleshooting-d901de7e8a9d.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-troubleshooting-d901de7e8a9d\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before executing any `gcloud`, REST API, or MCP command, you MUST read [Usage Attribution](references\/attribution.md). For commands executed directly in the terminal, 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.","instructions":"---\nname: gke-storage-troubleshooting\nmetadata:\n  category: Storage\n  version: \"1.1.1\"\ndescription: >-\n  Diagnoses GKE persistent-storage failures \u2014 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).\n---\n\n# GKE Storage Troubleshooting Skill\n\nUse this skill to systematically diagnose and resolve **persistent-storage\nfailures** for workloads running on GKE \u2014 volume attach\/mount errors, disk\nperformance and node storage pressure, volume expansion, storage-related\ncluster\/node-pool creation errors, and Cloud Storage FUSE memory issues. This\nskill operates non-interactively and enforces a read-only diagnostics boundary\nbefore proposing manifest or configuration corrections.\n\n> For routine storage **provisioning** and StorageClass\/PVC authoring, use the\n> `gke-storage` skill instead. This skill focuses on **failure diagnosis**.\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\/attribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\/1.0 (skill:gke-storage-troubleshooting)\"`\nand append `agent-skills\/1.0 (skill:gke-storage-troubleshooting)` to `User-Agent` headers.\n\n## \ud83d\udd0d Diagnosis & Resolution Workflow\n\n### Step 0: Non-Interactive Context Discovery & Dry-Run Fallback\n\n1.  **Parameter Extraction**: Extract required context (`project_id`,\n    `cluster_name`, `cluster_location`, `workload_name`, `workload_namespace`,\n    `pod_name`, and the relevant `pvc_name` \/ `pv_name` \/ `node_name`)\n    non-interactively from the user prompt, active `SETTINGS.md`, or environment\n    defaults:\n\n    -   Default `workload_namespace` to `default` if omitted.\n    -   Infer missing cluster parameters from the active environment (`kubectl\n        config current-context` or `gcloud config get-value project`).\n\n2.  **Cluster Credentials & Fallback Mode**:\n\n    -   Attempt credential fetch: `gcloud container clusters get-credentials\n        {cluster_name} --location {cluster_location} --project {project_id}`.\n    -   **Fallback \/ Dry-Run Mode**: If the cluster is unreachable,\n        non-existent, or live command execution fails (such as in sandboxed\n        evaluations, dry-run mode, or offline analysis):\n        -   Limit retry attempts to avoid resource exhaustion and context\n            overflow.\n        -   Immediately present the exact `kubectl` \/ `gcloud` diagnostic\n            commands for the human operator to run.\n        -   Synthesize the root-cause analysis and output the proposed GitOps\n            correction based on the reported symptoms.\n\n--------------------------------------------------------------------------------\n\n### Step 1: Classify the Storage Symptom\n\nGather the primary signals, then jump to the **matching branch under Step 2\n(Resolution)** \u2014 you normally perform **only the one branch** that matches your\ndiagnosis, not all of them.\n\n**Diagnostic Commands:**\n\n```bash\nkubectl describe pod {pod_name} -n {workload_namespace}\nkubectl get pvc,pv -n {workload_namespace}\nkubectl get events -n {workload_namespace} --sort-by='.metadata.creationTimestamp'\nkubectl describe node {node_name}\n```\n\n-   **Pod stuck in `ContainerCreating` with an attach\/mount event** \u2192 **Volume\n    Attach & Mount Failures**.\n-   **Node-level slowness, `PLEG is not healthy`, or `StoragePressureDetected`\n    events** \u2192 **Disk Performance & Node Storage Pressure**.\n-   **Cluster \/ node-pool creation or provisioning error** \u2192 **Storage\n    Provisioning & Creation Failures**.\n-   **A resized volume is not reflected inside the container** \u2192 **Volume\n    Expansion Not Reflecting in the Container**.\n-   **Cloud Storage FUSE Pod \/ sidecar OOM** \u2192 **Cloud Storage FUSE\n    Out-Of-Memory (OOM) Events**.\n\n--------------------------------------------------------------------------------\n\n### Step 2: Resolution\n\nPerform **only the branch that matches your Step 1 diagnosis**. These branches\nare mutually exclusive alternatives, not sequential steps.\n\n#### Volume Attach & Mount Failures\n\n-   **`Error 400: Cannot attach RePD to an optimized VM`**: Regional persistent\n    disks are restricted from being used with **memory-optimized** or\n    **compute-optimized** machine types.\n\n    -   If a regional PD is not a hard requirement, switch the workload to a\n        **non-regional persistent disk** StorageClass.\n    -   If a regional PD **is** required, use **taints and tolerations** so that\n        Pods needing regional PDs are scheduled onto a node pool that does\n        **not** use optimized machine types.\n\n-   **Pods stay `Pending` \/ `FailedScheduling` after a node pool is moved to a\n    4th-generation (N4, N4A, N4D) machine series while the workload uses a\n    Persistent Disk StorageClass**: N4\/N4A\/N4D machines **do not support\n    Persistent Disk** (they support Hyperdisk only), so a PVC bound to a `pd-*`\n    StorageClass cannot bind or schedule on those nodes. Events typically show\n    `FailedScheduling` with a volume node-affinity \/ topology conflict.\n\n    -   Switch the workload to a **Hyperdisk** StorageClass (for example `type:\n        hyperdisk-balanced`) for the Gen4 node pool.\n    -   For existing Persistent Disk volumes, migrate the data to a Hyperdisk\n        volume; the original PD cannot be attached to a Gen4 node.\n    -   If the workload must keep Persistent Disk, keep it on a PD-capable\n        machine series (for example N2) via node selection. This is a\n        machine-type\/disk-type incompatibility, **not** a capacity problem, so\n        increasing disk size or quota does not help.\n\n-   **Hyperdisk Pods become unschedulable when a compute class falls back across\n    VM generations (for example N4 priority, N2 fallback), or one StorageClass\n    must serve mixed generations**: a single static disk type in the\n    StorageClass is not compatible with every machine series in the fallback\n    list, so Pods cannot bind their volume on the fallback nodes.\n\n    -   Use **automated disk type selection**: set the StorageClass\n        `parameters.type` to `dynamic` with `hyperdisk-type`, `pd-type`, and\n        `disk-type-preference`, plus `use-allowed-disk-topology: \"true\"`, so GKE\n        selects a compatible disk type per node and schedules Pods only onto\n        nodes that support it. One dynamic StorageClass can then span multiple\n        VM generations (requires the GKE versions noted in the docs).\n\n        Example dynamic StorageClass (GKE 1.35.3-gke.1290000+):\n\n        ```yaml\n        apiVersion: storage.k8s.io\/v1\n        kind: StorageClass\n        metadata:\n          name: dynamic-volume\n        provisioner: pd.csi.storage.gke.io\n        volumeBindingMode: WaitForFirstConsumer\n        allowVolumeExpansion: true\n        parameters:\n          type: dynamic\n          pd-type: pd-balanced\n          hyperdisk-type: hyperdisk-balanced\n          # Preferred storage on nodes that support both PD and Hyperdisk;\n          # defaults to hyperdisk-type when omitted.\n          disk-type-preference: hyperdisk-type\n          # Best practice: schedule Pods only onto nodes that support the disk type.\n          use-allowed-disk-topology: \"true\"\n        ```\n\n-   **Mount stops responding due to the `fsGroup` setting**: A Pod configured\n    with a `securityContext.fsGroup` on a volume that contains a **large number\n    of files** makes the kubelet recursively change ownership on every file,\n    which can time out the mount. The symptom is:\n\n    ```\n    Unable to attach or mount volumes for pod; skipping pod ... timed out waiting for the condition\n    ```\n\n    Confirm by checking the Pod logs for a `Setting volume ownership for ... and\n    fsGroup set` entry, then apply one of:\n\n    -   Reduce the number of files in the volume.\n    -   Set `securityContext.fsGroupChangePolicy: OnRootMismatch` so ownership\n        is only changed when the top-level permissions do not match.\n    -   Stop using the `fsGroup` setting if it is not required.\n\n#### Disk Performance & Node Storage Pressure\n\n-   **Poor disk performance** (symptoms such as `task dockerd:... blocked for\n    more than 300 seconds`, `PLEG is not healthy`, or slow `fs: disk usage`\n    scans): the node boot disk is shared across the OS, container images, the\n    overlay filesystem, and disk-backed `emptyDir` volumes, and performance is\n    shared across all disks of the same type on the node.\n\n    -   This commonly affects nodes using **standard persistent disks smaller\n        than 200 GB**. Increase the disk size or switch to SSD, especially for\n        production.\n    -   Enable **Local SSD for ephemeral storage** on node pools whose workloads\n        frequently use `emptyDir`.\n\n-   **Slow disk operations cause Pod creation failures**: on affected node\n    versions (GKE 1.18\u20131.23 before the fixed patch releases), the `k8s_node\n    container-runtime` logs show `failed to reserve container name ... is\n    reserved for ...` (containerd issue #4604).\n\n    -   Mitigate with `restartPolicy: Always` or `OnFailure` in the PodSpec, and\n        increase boot-disk IOPS (larger disk or a faster disk type).\n    -   The permanent fix is containerd 1.6.0+; upgrade to a GKE version that\n        includes it.\n\n-   **`StoragePressureDetected` (high node storage pressure)**: node condition\n    `StoragePressureRootFileSystem` becomes `True` (for example, `Disk\n    \/dev\/nvme0n1 usage 89% exceeds threshold 85%`), caused by excessive\n    `emptyDir` writes, large image pulls, or accumulating logs.\n\n    -   Identify usage with `df -h` on the affected node (focus on\n        `\/mnt\/stateful_partition` and ephemeral mounts).\n    -   Remediate by using larger boot disks, adding Local SSDs for ephemeral\n        storage, setting appropriate `ephemeral-storage` requests\/limits, and\n        cleaning up unused files\/images\/logs.\n\n#### Storage Provisioning & Creation Failures\n\n-   **`The selected machine type ... has a fixed number of local SSD(s)`**: the\n    Local SSD count specified in `EphemeralStorageLocalSsdConfig` \/\n    `LocalNvmeSsdBlockConfig` does not match the fixed count included with the\n    machine type.\n\n    -   Specify a Local SSD count that matches the machine type. For\n        **third-generation** machine series, omit the Local SSD `count` flag and\n        the correct value is configured automatically.\n\n-   **Hyperdisk Storage Pools: cluster or node-pool creation fails** with\n    `ZONE_RESOURCE_POOL_EXHAUSTED` (or similar Compute Engine resource errors):\n    the target zone lacks capacity for the requested Hyperdisk Balanced disks or\n    machine type.\n\n    -   Select a new zone in the same region that has capacity and where\n        Hyperdisk Balanced Storage Pools are available. Because storage pools\n        are **zonal**, delete and recreate the pool in the new zone, then create\n        the cluster\/node pool there.\n\n#### Volume Expansion Not Reflecting in the Container\n\nVolume expansion must always be driven through the **PersistentVolumeClaim**.\nEditing the PersistentVolume directly can leave the container filesystem on the\nold size.\n\n1.  Keep the modified PersistentVolume object as it is.\n2.  Edit the **PersistentVolumeClaim** and set `spec.resources.requests.storage`\n    to a value **higher** than the current PersistentVolume size.\n3.  The kubelet then resizes the PV, PVC, and container filesystem\n    automatically. Verify inside the Pod:\n\n    ```bash\n    kubectl exec {pod_name} -n {workload_namespace} -- df -h\n    ```\n\n#### Cloud Storage FUSE Out-Of-Memory (OOM) Events\n\nIf Pods experience high memory use or OOM kills related to the Cloud Storage\nFUSE CSI driver:\n\n1.  Enable CPU\/memory snapshots by configuring **Cloud Profiler** on the Cloud\n    Storage FUSE CSI driver sidecar container.\n2.  Locate the OOM event in **Cloud Logging**, filtering by Pod:\n\n    ```\n    jsonPayload.involvedObject.name=\"{pod_name}\"\n    jsonPayload.involvedObject.kind=\"Pod\"\n    OOMKilled\n    ```\n\n    If the sidecar mounter or GCSFuse process OOMs, the Pod name is the workload\n    Pod's name; if the node driver OOMs, it is `gcsfusecsi-node-*`.\n3.  Extract the Pod UID (`jsonPayload.involvedObject.uid`) and timestamp, then\n    analyze the matching snapshot in **Cloud Profiler** using the\n    `{pod_name}_{pod_uid}` Service Version at the OOM timestamp.\n\n--------------------------------------------------------------------------------\n\n### Step 3: Propose the GitOps Correction\n\nEnforce the read-only diagnostics boundary: **do not** apply live mutations with\n`kubectl edit`, `kubectl patch`, or `kubectl apply`. Instead, present the\ncorrected StorageClass, PersistentVolumeClaim, PodSpec (`securityContext`,\n`restartPolicy`), or node-pool configuration as a reviewable patch to be applied\nthrough the user's GitOps pipeline (for example, Config Sync, Argo CD, or Flux).\n\n## References\n\n-   [Troubleshoot storage in GKE](https:\/\/docs.cloud.google.com\/kubernetes-engine\/docs\/troubleshooting\/storage.md.txt)\n-   [Regional persistent disk restrictions](https:\/\/docs.cloud.google.com\/compute\/docs\/disks.md.txt#restrictions_2)\n-   [Configure ephemeral storage with local SSDs](https:\/\/docs.cloud.google.com\/kubernetes-engine\/docs\/how-to\/persistent-volumes\/local-ssd.md.txt)\n-   [Cloud Storage FUSE CSI driver sidecar (enable Profiler)](https:\/\/docs.cloud.google.com\/kubernetes-engine\/docs\/how-to\/cloud-storage-fuse-csi-driver-sidecar.md.txt#enable-profiler)\n-   [Hyperdisk Storage Pools](https:\/\/docs.cloud.google.com\/kubernetes-engine\/docs\/how-to\/persistent-volumes\/hyperdisk-storage-pools.md.txt)\n-   [N4 machine series storage support (Persistent Disk not supported)](https:\/\/docs.cloud.google.com\/compute\/docs\/general-purpose-machines.md.txt)\n-   [Hyperdisk machine type support](https:\/\/docs.cloud.google.com\/compute\/docs\/disks\/hyperdisks.md.txt)\n-   [Hyperdisk automated disk type selection (dynamic StorageClass)](https:\/\/docs.cloud.google.com\/kubernetes-engine\/docs\/concepts\/hyperdisk.md.txt#automated_disk_type_selection)\n","use_cases":["Pods stuck in ContainerCreating due to volume attach\/mount errors","Node storage pressure or disk performance issues","Volume expansion not reflecting in the container","Cloud Storage FUSE OOM events"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/e3c591afe426ea585e4c21799e5199d6d47cd1be\/skills\/cloud\/gke-storage-troubleshooting\/SKILL.md","source_commit":"e3c591afe426ea585e4c21799e5199d6d47cd1be","license":null,"version":null,"listing_approved_at":"2026-11-17","created_at":"2026-11-16T16:38:37.000000Z","updated_at":"2026-11-17T10:20:00.000000Z","seo_title":"GKE Storage Troubleshooting Guide","seo_description":"Diagnose and resolve persistent-storage failures on GKE, including volume attach\/mount errors, disk performance issues, and node storage pressure.","seo_keywords":["GKE storage troubleshooting","volume attach mount errors","node storage pressure","disk performance issues","Cloud Storage FUSE OOM","Persistent Disk errors"]}}