Search⌘ K
AI Features

Storage Classes and Dynamic Provisioning

Explore Kubernetes StorageClasses to understand how dynamic provisioning of persistent volumes works. Learn different storage tiers, access modes, and reclaim policies to manage storage effectively in Kubernetes environments.

Storage classes are resources in the storage.k8s.io/v1 API group. The resource type is StorageClass, and we define them in regular YAML files. We can use the sc short name when using kubectl.

Note: We can run a kubectl api-resources command to see a full list of API resources and their short names. It also shows each resource’s API group and what its equivalent kind is.

As the name suggests, StorageClasses let us define different classes of storage that apps can request. How we define our StorageClasses is up to us and will depend on the types of storage we have available. For example, if we have a storage system with fast and slow storage, as well as optional remote replication, we might define these four classes:

  • fast-local

  • fast-replicated

  • slow-local ...