Course contentsShow
← Cloud and Infrastructure
Lesson 1312 of 2,98926. Kubernetes StorageFree lesson

GCP Persistent Disk StorageClasses

Setting up StorageClasses for GCE Persistent Disks with pd-standard, pd-ssd, and pd-balanced options.

GCP Persistent Disk StorageClasses

What you'll learn: How to configure StorageClasses for Google Cloud Platform Persistent Disks with different performance tiers.

When running Kubernetes on GCP (Google Kubernetes Engine), you need to tell Kubernetes what type of disk to provision when applications request storage. GCP offers three main Persistent Disk options, and StorageClasses let you expose these choices to your developers.

The Three Disk Types

Think of these like choosing between economy, standard, and premium car rentals:

pd-standard - Traditional HDD-backed disks. These are the most cost-effective option for workloads that don't require high performance, like backups, logs, or infrequently accessed data. Lower IOPS and throughput.

pd-ssd - High-performance SSD-backed disks. Use these for databases, real-time analytics, or any application where speed matters. Higher cost, but significantly faster IOPS and lower latency.

pd-balanced - The middle ground introduced by Google. SSD-backed but optimized for cost-performance balance. Good for general-purpose workloads that need better performance than standard but don't require the premium price of full SSD.

Creating Your StorageClasses

You define these options by creating StorageClass resources with the provisioner set to kubernetes.io/gce-pd and specifying the type parameter:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: fast-ssd
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-ssd
  replication-type: regional-pd

The type parameter determines which disk tier GCP provisions. You can also specify replication-type for regional (replicated across zones) versus zonal disks.

Key Takeaway: GCP Persistent Disk StorageClasses let you expose pd-standard, pd-ssd, and pd-balanced disk types to match workload performance and cost requirements through the StorageClass type parameter.