Bound.
Reference a PVC in a Workload
Complete the following configuration in the workload’s Pod template:- Reference the PVC through
persistentVolumeClaim.claimNameinspec.volumes. - Set the volume name and mount directory in the container’s
volumeMounts.
training-data-pvc to the container’s /data directory.
namespace, image, mountPath, and claimName with actual values. Workloads such as Deployments, StatefulSets, and Jobs can also use the same volumes and volumeMounts configuration in their Pod templates.
Submit and confirm the mount result
- Log in to the GPU Cloud console and go to the Clusters page.
- Click the name of the target cluster to go to the cluster workspace.
- In the left navigation pane, go to the Workloads page, select the appropriate workload type, and submit the YAML.
-
Verify that the workload is running properly and that the container can read and write data through the target mount directory.
If a Pod remains in
Pendingfor an extended period or a container cannot start, check whether the PVC isBound, whether the PVC and workload are in the same namespace, and whetherclaimNameis correct.
Unmount PVC
Before deleting a PVC, remove all workload references to the PVC:- For workloads managed by controllers such as Deployment, StatefulSet, and Job, update the Pod template and remove the corresponding
volumeMountsandvolumesconfigurations. - For directly created Pods, stop and delete the Pod, or recreate it using a configuration that no longer references the PVC.

