{"data":{"slug":"github-google-skills-skills-cloud-gke-storage-5cfe8b680f08","title":"Configure GKE Storage for Persistent Volumes and Cloud Storage Integration","summary":"This skill guides you through setting up GKE storage, including PersistentVolumeClaims (PVCs), Filestore, and Cloud Storage FUSE mounts. Use it when deploying stateful applications or integrating cloud storage into your Kubernetes cluster.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-5cfe8b680f08","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-gke-storage-5cfe8b680f08","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-5cfe8b680f08.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-storage-5cfe8b680f08\/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)\"` and append `agent-skills\/1.0 (skill:gke-storage)` to `User-Agent` headers.","instructions":"---\nname: gke-storage\ndescription: >-\n  Manages GKE storage, including PVCs, PersistentVolumes, and Filestore. Use\n  when configuring GKE storage or creating PVCs. For GCS FUSE mounts, use\n  google-cloud-storage-fuse. For diagnosing storage failures (volume attach\/mount\n  errors, disk performance\/node storage pressure, or Cloud Storage FUSE OOM), use\n  gke-storage-troubleshooting. Don't use for database\n  administration or replication strategies outside volume provisioning context.\nmetadata:\n  version: \"1.0.3\"\n  category: Storage\n---\n\n# GKE Storage\n\n> **Routing Note:** For Cloud Storage FUSE (`gcsfuse`) mounts or the GKE `gcsfuse.csi.storage.gke.io` CSI driver, open `google-cloud-storage-fuse\/SKILL.md`.\n\nThis reference covers storage configuration for GKE clusters including\npersistent disks, file storage, and cloud storage integration.\n\n> **MCP Tools:** `apply_k8s_manifest`, `get_k8s_resource`,\n> `describe_k8s_resource`, `get_cluster`\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)\"`\nand append `agent-skills\/1.0 (skill:gke-storage)` to `User-Agent` headers.\n\n## Golden Path Storage Defaults\n\nThe golden path Autopilot config enables these CSI drivers:\n\n| Driver          | Golden Path       | Access Mode     | Use Case             |\n| --------------- | ----------------- | --------------- | -------------------- |\n| Compute Engine  | Enabled (default) | ReadWriteOnce   | Block storage for    |\n: Persistent Disk :                   :                 : databases,           :\n: CSI             :                   :                 : single-pod workloads :\n| Google Cloud    | Enabled           | ReadWriteMany   | Shared NFS for       |\n: Filestore CSI   :                   :                 : multi-pod access     :\n| Cloud Storage   | Enabled           | ReadWriteMany \/ | Mount GCS buckets as |\n: FUSE CSI        :                   : ReadOnlyMany    : volumes              :\n| Parallelstore   | Enabled           | ReadWriteMany   | High-performance     |\n: CSI             :                   :                 : parallel file system :\n| Boot disk type  | `pd-balanced`     | N\/A             | Node boot disks      |\n\n## StorageClasses\n\n### Default StorageClasses\n\nGKE provides built-in StorageClasses:\n\nStorageClass   | Disk Type             | Use Case\n-------------- | --------------------- | ------------------------------\n`standard-rwo` | `pd-standard`         | Cost-effective, low IOPS\n`premium-rwo`  | `pd-ssd`              | High IOPS, databases\n`standard-rwx` | Filestore (Basic HDD) | Shared NFS\n`premium-rwx`  | Filestore (Basic SSD) | Shared NFS, higher performance\n\n### Custom StorageClass\n\n```yaml\napiVersion: storage.k8s.io\/v1\nkind: StorageClass\nmetadata:\n  name: fast-regional\nprovisioner: pd.csi.storage.gke.io\nparameters:\n  type: pd-ssd\n  replication-type: regional-pd    # Replicate across 2 zones\nvolumeBindingMode: WaitForFirstConsumer\nallowVolumeExpansion: true         # Always enable for production\n```\n\n## PersistentVolumeClaims\n\n### Block Storage (ReadWriteOnce)\n\n```yaml\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: database-pvc\nspec:\n  accessModes:\n  - ReadWriteOnce\n  storageClassName: premium-rwo\n  resources:\n    requests:\n      storage: 100Gi\n```\n\n### Shared File Storage (ReadWriteMany via Filestore)\n\n```yaml\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: shared-data\nspec:\n  accessModes:\n  - ReadWriteMany\n  storageClassName: standard-rwx\n  resources:\n    requests:\n      storage: 1Ti    # Filestore minimum is 1 TiB for Basic tier\n```\n\n### GCS Bucket Mount (Cloud Storage FUSE)\n\nMount a GCS bucket as a volume without a PVC:\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: gcs-reader\n  annotations:\n    gke-gcsfuse\/volumes: \"true\"\nspec:\n  containers:\n  - name: reader\n    image: busybox\n    command: [\"ls\", \"\/data\"]\n    volumeMounts:\n    - name: gcs-bucket\n      mountPath: \/data\n  volumes:\n  - name: gcs-bucket\n    csi:\n      driver: gcsfuse.csi.storage.gke.io\n      readOnly: true\n      volumeAttributes:\n        bucketName: <BUCKET_NAME>\n```\n\n> Requires Workload Identity for the pod's service account to have\n> `storage.objectViewer` on the bucket.\n\n## Volume Expansion\n\nIf `allowVolumeExpansion: true` is set on the StorageClass, resize by updating\nthe PVC:\n\n```bash\n# kubectl\nkubectl patch pvc <PVC_NAME> -p '{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"200Gi\"}}}}'\n```\n\n```\n# MCP (preferred)\npatch_k8s_resource(parent=\"...\", resourceType=\"persistentvolumeclaim\", name=\"<PVC_NAME>\",\n  patch='{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"200Gi\"}}}}')\n```\n\nKubernetes automatically resizes the filesystem.\n\n## Stateful Storage & Capacity Constraints\n\nWhen configuring storage for stateful workloads, keep the following capacity and scheduling constraints in mind:\n\n*   **Existing zonal PVs pin the workload to a zone:** A Pod that uses an existing zonal PersistentVolume (for example, in `europe-north1-b`) can only run in that zone. The cluster autoscaler can't work around a capacity shortage by adding nodes in another zone; any fallback must be in the same zone.\n*   **Use automated disk type selection and topology-aware scheduling for new workloads:** Use `volumeBindingMode: WaitForFirstConsumer` so the volume is created in the zone where the Pod lands. When a ComputeClass mixes machine generations (for example, C4\/N4 priority with N2 fallback), configure the StorageClass for **automated disk type selection** (`parameters.type: dynamic` with `pd-type: pd-balanced`, `hyperdisk-type: hyperdisk-balanced`, `disk-type-preference: hyperdisk-type`, and `use-allowed-disk-topology: \"true\"`, GKE 1.35.3-gke.1290000+; or `use-allowed-disk-topology: \"true\"` on GKE 1.34.1-gke.2541000+) so the autoscaler only picks nodes that support the disk type and new volumes get a compatible disk type per node.\n*   **Same-zone PD-type swaps rarely help:** Switching a same-zone fallback from `pd-ssd` to `pd-balanced` is unlikely to resolve a zonal capacity shortage, because both can be affected by the same zonal constraints. Prefer a fallback to a Hyperdisk-capable machine series (for example, C3 or N4) with `hyperdisk-balanced`.\n*   **Check Hyperdisk quotas first:** Hyperdisk quotas (for example, `HDB-TOTAL-GB`, throughput, and IOPS) are separate from Persistent Disk quotas. Verify the regional limits before recommending a Hyperdisk Balanced fallback.\n\n## Best Practices\n\n1.  **Always enable volume expansion**: Set `allowVolumeExpansion: true` on all\n    StorageClasses\n2.  **Use regional PDs for production**: `replication-type: regional-pd`\n    replicates across 2 zones for HA\n3.  **Use `WaitForFirstConsumer`**: Ensures the PV is provisioned in the same\n    zone as the pod\n4.  **Choose the right disk type**: `pd-ssd` for databases, `pd-balanced`\n    (golden path default) for general use, `pd-standard` for cold storage\n5.  **Use Filestore for shared access**: When multiple pods need to read\/write\n    the same files\n6.  **Use GCS FUSE for data pipelines**: Mount buckets directly for ML training\n    data, logs, etc.\n7.  **Back up PVCs**: Use Backup for GKE (see the `gke-backup-dr` skill) to\n    protect persistent data\n","use_cases":["Deploy a stateful application using PersistentVolumeClaims (PVCs) with block storage","Mount a GCS bucket as a volume using Cloud Storage FUSE (gcsfuse) for read-only access","Set up shared file storage using Filestore for multi-pod access"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/e3c591afe426ea585e4c21799e5199d6d47cd1be\/skills\/cloud\/gke-storage\/SKILL.md","source_commit":"e3c591afe426ea585e4c21799e5199d6d47cd1be","license":null,"version":null,"listing_approved_at":"2026-11-17","created_at":"2026-11-16T16:42:16.000000Z","updated_at":"2026-11-17T10:20:00.000000Z","seo_title":"Configure GKE Storage for Persistent Volumes and Cloud Storage","seo_description":"Configure GKE storage for persistent volumes, PVCs, and Cloud Storage FUSE mounts. Learn how to set up storage for stateful applications and integrate cloud storage intoK","seo_keywords":["GKE storage configuration","PersistentVolumeClaim setup","Cloud Storage FUSE mount","Filestore CSI driver","GKE storage class setup"]}}