Dynamic provisioning

Last published : Jun 12, 2026
You can dynamically provision a volume over shared storage (CVM) and shared nothing (FSS) storage. In dynamic provisioning, you must create a Storage Class that define the storage provisioner and the required parameters in the storage class yaml file and create the Persistent Volume Claim. The Pod references the Storage Class through an existing Persistent Volume Claim and dynamically allocates storage for the requesting Pod.
While allocating storage to pods dynamically, you can reclaim the storage when the previously provisioned storage is available for other applications to use. You can resize an existing volume using the Persistent Volume Claim (PVC) object.
Perform the following steps for allocating storage dynamically to container workloads:
  1. Create a Storage Class using a yaml file.
    oc create -f csi-infoscale-sc.yaml
    1. Define the Persistent Volume Claim and specify the appropriate Storage Class, access mode, and the required storage size.
    csi-dynamic-pvc.yaml
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: csi-infoscale-pvc
    spec:
      storageClassName: csi-infoscale-sc
      accessModes:
        -  ReadWriteMany

      resources:
        requests:
          storage: 5Gi
  2. Create a Persistent Volume Claim using the yaml.
    oc create -f csi-dynamic-pvc.yaml
    1. Update csi-mysql-app.yaml and specify the Persistent Volume Claim name.
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: mysql-deployment
      labels:
        app: mysql
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: mysql
      template:
        metadata:
          labels:
            app: mysql
        spec:
          containers:
            -  name: mysql
              image: mysql:latest
              ports:
                -  containerPort: 3306
              volumeMounts:
                -  mountPath: "/var/lib/mysql"
                  name: mysql-data
              env:
                -  name: MYSQL_ROOT_PASSWORD
                  value: root123
          volumes:
            -  name: mysql-data
              persistentVolumeClaim:
                claimName: csi-infoscale-pvc
  3. Create the application pod.
oc create -f csi-mysql-app.yaml
After the pod is created, start using the InfoScale PVC as a Persistent Storage.