Skip to content

Storage

Persistent storage in your cluster is backed by Ceph. Two kinds are available as optional add-ons:

  • Block storage as persistent volumes, for a disk attached to a single pod at a time.
  • S3-compatible object storage, for data your application reads and writes over the network.

Persistent volumes (block storage)

Request storage with a PersistentVolumeClaim naming the storage class for the tier you want. The cluster provisions a Ceph block volume and attaches it to the node running your pod.

List the storage classes available on your cluster:

kubectl get storageclass

Then claim a volume:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data
  namespace: my-app
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: <storage-class>
  resources:
    requests:
      storage: 20Gi

Mount the claim in your pod's volumes and volumeMounts. A block volume is ReadWriteOnce: it is attached to one node at a time, so it suits databases and other single-writer workloads. Design stateless application tiers to keep their data here or in object storage rather than on the pod filesystem, which is lost when the pod is rescheduled.

Object storage

For object storage, use the S3 endpoint and credentials described under Ceph → Object storage (S3). Store the access key and secret as a Kubernetes secret (committed with Sealed Secrets) and point your application's S3 client at https://s3.orion.sunetvdc.se.

Backup

Persistent volumes and object storage are not backed up by Sunet unless you order the backup add-on. See Backup and disaster recovery.