Persistent Volumes
Rackspace Spot provides four out-of-the-box storage classes for persistent volumes, in addition to the ephemeral storage available on worker nodes.
Ephemeral Storage
Spot worker nodes have a certain amount of local storage that can be used as ephemeral storage. Please note that this is intended to be available as temporary storage, and data stored here will be lost when nodes are de-provisioned. Ephemeral storage is also not intended to store large amounts of data, since that space must be shared with containers and for other purposes.
Persistent Volume Storage Classes
Spot provides the following storage classes:
Datacenter | STORAGE CLASS | SUPPORTED VOLUMEs |
---|---|---|
Gen-1 | ssd | 5GB - 20GB ssd volumes (default) |
Gen-1 | ssd-large | >= 50GB ssd volumes |
Gen-1 | sata | 5GB - 20GB sata volumes |
Gen-1 | sata-large | >= 75GB sata volumesG |
Gen-2 | ssdv2-performance | Default storage class for Gen-2 datacenters. >=10GB volumes featuring:
|
Gen-2 | ssdv2 | >=10GB volumes on NVMe SSDs featuring:
|
Default Storage Class
The 'ssd' storage class is the default in gen-1 datacenters, and will be used if you don't specify an alternate storage class in your persistent volume claim. In gen-2 datacenters, ssdv2-performance is the default storage class.
Creating a Persistent Volume Claim
Here is an example of a persistent volume claim that uses the 'default' storage class for a 7GB PVC:
kind PersistentVolumeClaim
apiVersion v1
metadata
name my-minecraft
labels
app my-minecraft
chart"minecraft-4.12.0"
app.kubernetes.io/name"minecraft"
app.kubernetes.io/instance my-minecraft
app.kubernetes.io/version"4.12.0"
annotations
volume.alpha.kubernetes.io/storage-class default
spec
accessModes
ReadWriteOnce
resources
requests
storage"7Gi"
Notable Limitations
- Note the distinction between gen-2 datacenters and gen-1 datacenters
- Persistent Volumes <5GB are not currently supported
- Persistent Volumes between 20GB and 50GB are not currently supported
- Access mode can only be ReadWriteOnce. ReadWriteMany is not currently supported
- This means that the volume can be mounted as read-write by a single node. Multiple pods can access the volume when the pods are running on the same node.