Appearance
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: 128GiApply it with your namespace kubeconfig:
bash
kubectl --kubeconfig ./kubeconfig-team-ml.yaml apply -f pvc.yaml
kubectl --kubeconfig ./kubeconfig-team-ml.yaml get pvc workspaceRemoteGPU 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: workspaceExpand 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: 256GiThen apply the manifest again:
bash
kubectl --kubeconfig ./kubeconfig-team-ml.yaml apply -f pvc.yamlKubernetes storage expansion is one-way. To move to a smaller volume, create a new PVC and copy the data.
Supported storage profile
| Field | Required | Supported value |
|---|---|---|
spec.storageClassName | Yes | storage-standard |
spec.accessModes | Yes | ReadWriteOnce |
spec.resources.requests.storage | Yes | 8Gi, 16Gi, 32Gi, 64Gi, 128Gi, 256Gi, 512Gi, 1Ti, or 2Ti |
spec.volumeMode | No | Filesystem 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
| Symptom | What to check |
|---|---|
| PVC creation is rejected | Confirm storageClassName, accessModes, and requested size match the supported storage profile |
| PVC stays pending | Check the PVC events with kubectl describe pvc; confirm the requested size is one of the supported sizes |
| Workload does not see the mounted data | Confirm the workload references the correct claimName and the volumeMounts path matches the container path you expect |
| Expansion does not apply | Increase the request to a larger supported size; shrinking an existing PVC is not supported |
| Data disappeared after cleanup | Confirm whether the PVC was deleted; delete a PVC only when the stored data is no longer needed |
Read next
- Read Deployments to mount a PVC in an application.
- Read Services to expose a deployment inside the cluster.
