Using SSD Persistent Disks

This page explains how to create PersistentVolume resources that are backed by SSD persistent disks.

SSD persistent disks

By default, dynamically provisioned PersistentVolumes use the default StorageClass and are backed by standard hard disks. If you need faster SSDs you can create a special StorageClass. The following manifest describes a StorageClass named faster. PersistentVolumeClaims made with this StorageClass are backed by SSDs:

ssd-storageclass.yaml

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

To create a PersistentVolumeClaim named "my-volume" with the faster StorageClass, refer to the StorageClass in the claim's manifest:

ssd-claim.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-volume
spec:
  storageClassName: faster
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi
    

Use kubectl apply to create this StorageClass and PersistentVolumeClaim:

kubectl apply -f ssd-storageclass.yaml
kubectl apply -f ssd-claim.yaml
Was this page helpful? Let us know how we did:

Send feedback about...

Kubernetes Engine