Managing storage classes
Storage class (StorageClass
) allows administrators to divide the stores they provision into classes with defined parameters. Classes vary by disk type and pricing policy.
Alert
The cost of using a store depends on its disk type. Please review Compute Cloud disk prices prior to creating a store.
Managed Service for Kubernetes provides storage classes for all disk types available in Nebius AI:
nebius-network-hdd
(default)nebius-network-ssd
nebius-network-ssd-nonreplicated
nebius-network-ssd-io-m3
All storage is created with the following parameters:
- Volume Binding Mode
:WaitForFirstConsumer
. - Reclaim Policy
:Delete
.
These classes only let you use PersistentVolumeClaim
and PersistentVolume
in ReadWriteOnce
access mode
You can also create your own storage class.
Create a storage class
-
Save the storage class creation specification in the YAML file:
Learn more about the storage class creation specification format.
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: my-sc-ssd provisioner: nebius.com volumeBindingMode: WaitForFirstConsumer parameters: type: network-ssd csi.storage.k8s.io/fstype: ext4 allowVolumeExpansion: false reclaimPolicy: Retain
-
Run the command:
kubectl create -f my-sc-ssd.yaml
Result:
storageclass.storage.k8s.io/my-sc-ssd created
-
Check that the storage class was created:
kubectl get storageclass
Result:
NAME PROVISIONER AGE my-sc-ssd nebius.com 76s nebius-network-ssd nebius.com 16m
Create a storage class specification format
Each StorageClass
object contains parameters
, allowVolumeExpansion
, and reclaimPolicy
, which are used for dynamic PersistentVolume
object allocation.
YAML file structure:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: <storage class name> # Used for accessing the storage class.
provisioner: <provisioner name>
volumeBindingMode: WaitForFirstConsumer
parameters: # Storage class parameters.
type: <disk type>
csi.storage.k8s.io/fstype: <file system type>
allowVolumeExpansion: <activate volume expansion mechanism>
reclaimPolicy: <reclaim policy>
Acceptable parameter values:
parameters
:type
:network-hdd
ornetwork-ssd
.csi.storage.k8s.io/fstype
:ext2
,ext3
orext4
.
reclaimPolicy
:Retain
orDelete
.allowVolumeExpansion
:true
orfalse
.