DELAPARRA
Index
Color
NL
Category: Kubernetes

StorageClass

Explained by Updated

What is StorageClass?

StorageClass: A template for dynamically provisioning PVs. Defines the provisioner (e.g. an EBS or GCE PD driver) and parameters like disk type. A StorageClass in Kubernetes describes a type of storage that can be created on demand. It names the provisioner, such as the cloud provider's disk driver, and settings like disk type, speed and reclaim policy.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about StorageClass

How is StorageClass used in practice?

When a PersistentVolumeClaim asks for storage of a certain class, Kubernetes creates a matching volume automatically. Managed clusters come with a default class, so claims without a class still get a disk.

What should you keep in mind with StorageClass?

Check the default's reclaim policy. With Delete, removing a claim also deletes the disk and its data; Retain keeps the disk for manual cleanup. Use faster SSD classes for databases and cheaper ones for bulk data. Enable allowVolumeExpansion if the provider supports it, so you can grow volumes later without recreating them.

What does an example of StorageClass look like?

apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast-ssd provisioner: ebs.csi.aws.com parameters: type: gp3

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.