gke-storage
Guidance on managing storage in Google Kubernetes Engine (GKE) clusters.
Works with
---
name: gke-storage
description: Guidance on managing storage in Google Kubernetes Engine (GKE) clusters.
license: Apache-2.0
---
# GKE Storage Best Practices
This skill provides guidance on managing storage in Google Kubernetes Engine (GKE) clusters.
## Overview
GKE supports various storage options, from Persistent Disks to Cloud Storage. Choosing the right storage type and configuring it correctly is essential for performance and reliability.
## Workflows
### 1. Configure Storage Classes
StorageClasses allow you to describe the "classes" of storage you offer. Different classes might map to quality-of-service levels, or to backup policies.
**Example StorageClass Manifest:**
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: premium-rwo
provisioner: pd.csi.storage.gke.io
parameters:
type: pd-ssd
replication-type: regional-pd
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
```
Setting `allowVolumeExpansion: true` is highly recommended for production.
### 2. Use CSI Drivers
GKE includes container storage interface (CSI) drivers for dynamic provisioning of storage.
- **Compute Engine Persistent Disk CSI Driver**: Default for block storage.
- **Google Cloud Filestore CSI Driver**: For managed NFS (ReadWriteMany).
- **Cloud Storage FUSE CSI Driver**: For mounting GCS buckets as volumes.
**Example using Filestore CSI Driver:**
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: filestore-pvc
spec:
accessModes:
- ReadWriteMany
storageClassName: standard-rwm # Pre-defined for Filestore
resources:
requests:
storage: 1Ti
```
### 3. Implement Volume Expansion
If `allowVolumeExpansion` is true in the StorageClass, you can resize a volume by updating the PVC manifest.
**Steps:**
1. Edit the PVC manifest and increase the storage request.
2. Apply the changes.
Kubernetes will automatically resize the file system on the volume.
## Best Practices
1. **Use CSI Drivers**: Always use the official Google Cloud CSI drivers for best integration and performance.
2. **Enable Volume Expansion**: Always set `allowVolumeExpansion: true` in your StorageClasses to allow for growth.
3. **Choose the Right Disk Type**: Use `pd-ssd` or `pd-extreme` for I/O intensive workloads, and `pd-standard` or `pd-balanced` for others.
4. **Use ReadWriteMany Carefully**: Filestore (NFS) is great for sharing data among multiple Pods, but be aware of file locking and consistency semantics.More DevOps & Infrastructure skills
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
appinsights-instrumentation
microsoft/azure-skills
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
azure-storage
microsoft/azure-skills
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake. Answers questions about storage access tiers (hot, cool, cold, archive), when to use each tier, and tier comparison. Provides object storage, SMB file shares, async messaging, NoSQL key-value, and big data analytics. Includes lifecycle management. USE FOR: blob storage, file shares, queue storage, table storage, data lake, upload files, download blobs, storage accounts, access tiers, storage tiers, hot cool cold archive, storage tier comparison, when to use storage tiers, lifecycle management, Azure Storage concepts. DO NOT USE FOR: SQL databases, Cosmos DB (use azure-prepare), messaging with Event Hubs or Service Bus (use azure-messaging).

