<p>This may be a basic question but I haven't seen any documentation on it.</p>

<p>Can you override parameters defined within the StorageClass using the PVC?</p>

<p>For example, here is a StorageClass I have created: </p>

<pre><code>---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: sc-gold
provisioner: hpe.com/hpe
parameters:
  provisioning: 'full'
  cpg: 'SSD_r6'
  snapcpg: 'FC_r6'
</code></pre>

<p>PVC</p>

<pre><code>---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvc-nginx
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: sc-gold
</code></pre>

<p>I want to use the "sc-gold" StorageClass as defined above but be able to override/change the provisioning type from "full" to "thin" when creating the PVC without having to create another StorageClass. I don't see any examples of how the PVC would be formatted or if this is even supported within the spec.</p>

<p>Traditionally as Storage Admins, we create the StorageClass as storage "profiles" and then the users are assigned/consume the SC in order to create volumes, but is there any flexibility in the spec? I just want to limit the StorageClass sprawl that I can see happening in order to accommodate any and all scenarios.</p>

<p>Thoughts?</p>

Budhac
<p>No. you cant override storage class params during PVC creation. you might need to create additional storageClass and map the required storageClass to the PVC.</p>
