Storage

Persistent storage at kuber is powered by ceph rbd.

Create Volume

Cluster already have default storage class, so you don't need to specify

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-app-pvc
spec:
  accessModes:
    - ReadWriteOnce # only support ReadWriteOnce and ReadOnlyMany
  resources:
    requests:
      storage: 500Mi

Use Volumes in Pods

Persistent volumes can be used by any pod: single pod, deployment, job, cronjob, statefulset, etc

kind: Pod
apiVersion: v1
metadata:
 name: box
spec:
  containers:
    - name: box
      image: alpine
      resources:
        limits: { memory: "100Mi", cpu: "100m" }
      command: ["/bin/sh", "-c"]
      args:
        - sleep 100000
      volumeMounts:
        - name: my-app-pvc
          mountPath: /storage # storage will be attached to /storage
  volumes:
    - name: my-app-pvc
      persistentVolumeClaim:
        claimName: my-app-pvc

See complete yaml in Cloud Commander Example

Expanding Storage

At any time you can increase your persistent volumes, but can not decrease

To increase storage we need to define it again with bigger capacity, use kubectl apply -f my-app-pvc.yaml or kubectl edit my-app-pvc

If you need more storage then your quota - please contact support