Skip to content

Storage

A Kubernetes PersistentVolumeClaim (PVC) requests persistent storage in a namespace. Use PVCs on RemoteGPU when workload data must survive pod restarts or rescheduling.

RemoteGPU supports the storage-standard storage class for namespace-scoped Kubernetes PersistentVolumeClaim resources.

Create a PVC

A PVC needs a storage class, access mode, and requested size. The example below creates a 128Gi filesystem volume that can be mounted by one node at a time.

Create a PVC in your namespace:

yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: workspace
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: storage-standard
  resources:
    requests:
      storage: 128Gi

Apply it with your namespace kubeconfig:

bash
kubectl --kubeconfig ./kubeconfig-team-ml.yaml apply -f pvc.yaml
kubectl --kubeconfig ./kubeconfig-team-ml.yaml get pvc workspace

RemoteGPU accepts PVCs that use the supported storage class, access mode, and storage size shown above. volumeMode may be omitted, but must be Filesystem when present.

Attach storage to a deployment

Reference the PVC from a workload and mount it in the container:

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: persistent-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: persistent-demo
  template:
    metadata:
      labels:
        app: persistent-demo
        remotegpu.ai/sku-code: cpu-shared-8g
    spec:
      containers:
        - name: app
          image: nginx:1.27-alpine
          volumeMounts:
            - name: workspace
              mountPath: /workspace
      volumes:
        - name: workspace
          persistentVolumeClaim:
            claimName: workspace

Expand a PVC

To expand a PVC, increase the requested size to another supported size:

yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: workspace
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: storage-standard
  resources:
    requests:
      storage: 256Gi

Then apply the manifest again:

bash
kubectl --kubeconfig ./kubeconfig-team-ml.yaml apply -f pvc.yaml

Kubernetes storage expansion is one-way. To move to a smaller volume, create a new PVC and copy the data.

Supported storage profile

FieldRequiredSupported value
spec.storageClassNameYesstorage-standard
spec.accessModesYesReadWriteOnce
spec.resources.requests.storageYes8Gi, 16Gi, 32Gi, 64Gi, 128Gi, 256Gi, 512Gi, 1Ti, or 2Ti
spec.volumeModeNoFilesystem when setting it explicitly

Set spec.storageClassName to storage-standard in each PVC manifest.

Expansion is supported by increasing the PVC storage request to a larger supported size.

A PVC owns the data stored for that claim. Delete the PVC only when you no longer need the stored data.

Troubleshooting

SymptomWhat to check
PVC creation is rejectedConfirm storageClassName, accessModes, and requested size match the supported storage profile
PVC stays pendingCheck the PVC events with kubectl describe pvc; confirm the requested size is one of the supported sizes
Workload does not see the mounted dataConfirm the workload references the correct claimName and the volumeMounts path matches the container path you expect
Expansion does not applyIncrease the request to a larger supported size; shrinking an existing PVC is not supported
Data disappeared after cleanupConfirm whether the PVC was deleted; delete a PVC only when the stored data is no longer needed
  • Read Deployments to mount a PVC in an application.
  • Read Services to expose a deployment inside the cluster.

RemoteGPU customer documentation