Back to Glossary
Storage

StorageClass

A cluster resource that defines a storage provisioner and parameters, enabling dynamic PV provisioning on demand.

What is StorageClass?

A StorageClass is a cluster-scoped resource that describes a class of storage — its provisioner (the CSI driver or built-in plugin that creates the actual disk), parameters (disk type, replication factor, IOPS tier), reclaimPolicy (Delete or Retain), volumeBindingMode (Immediate or WaitForFirstConsumer), and allowVolumeExpansion. When a PVC references a StorageClass by name, Kubernetes automatically provisions a new PersistentVolume of the specified type and size without administrator intervention.

Cloud providers supply built-in StorageClasses: on GKE, standard (HDD) and premium-rwo (SSD); on EKS, gp2 (general purpose SSD) and io1 (provisioned IOPS SSD); on AKS, managed-premium and azuredisk-csi. Organizations typically create custom StorageClasses to tune parameters for different workloads — a high-IOPS class for databases and a cheaper HDD class for log storage.

The volumeBindingMode: WaitForFirstConsumer setting is important for multi-zone clusters: it delays PV provisioning until a Pod is scheduled, ensuring the PV is created in the same availability zone as the node, avoiding cross-zone data transfer fees and mount failures.

Example

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ssd-retain
provisioner: pd.csi.storage.gke.io
parameters:
  type: pd-ssd
  replication-type: regional-pd
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true

Cost & Waste Implications

The default StorageClass in many clusters is premium SSD, meaning PVCs without an explicit storageClassName get expensive SSD volumes even for workloads that only need HDD. Switching log storage or dev environment PVCs from SSD to HDD StorageClasses can reduce storage costs by 5–10x. StorageClasses with reclaimPolicy: Delete are safer for cost management — they automatically delete cloud disks when PVCs are deleted.

KorPro— Kubernetes Cost Optimization

How KorPro Helps

KorPro reports orphaned PVCs grouped by StorageClass with per-class cost estimates, helping teams identify which storage tiers are accumulating the most waste.

Scan Your Cluster Free

Stop Wasting Money on Orphaned Kubernetes Resources

KorPro connects to your clusters across GCP, AWS, and Azure — no agents, no installation — and surfaces every orphaned resource with its monthly cost estimate.