<p>We're requesting persistence on kubernetes using persistence volume claim.</p>

<p>Currently, we're setting <code>storage class</code> using <code>volume.beta.kubernetes.io/storage-class</code> annotation:</p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: vault-file-backend-volumeclaim
  annotations:
    volume.beta.kubernetes.io/storage-class: heketi
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>

<p>However, we've realized that exists an <code>spec.storageClassName</code> field, we don't know what's it for...</p>

<p>Could we remove <code>volume.beta.kubernetes.io/storage-class</code> annotation by setting <code>spec.storageClassName</code>?</p>

<p>Yes, you should opt for <code>storageClassName</code>, because the annotation will be deprecated in the future, as state in <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class" rel="nofollow noreferrer">kubernetes.io</a>:</p>

<blockquote>
  <p>In the past, the annotation <code>volume.beta.kubernetes.io/storage-class</code>
  was used instead of the storageClassName attribute. This annotation is
  still working, however it will become fully deprecated in a future
  Kubernetes release.</p>
</blockquote>

<p>So your YML file will be the following:</p>

<p><code>storageclass.yml</code>:</p>

<pre><code>apiVersion: storage.k8s.io/v1beta1  
kind: StorageClass  
metadata:  
  name: heketi
provisioner: kubernetes.io/glusterfs  
parameters:  
  resturl: [...]
  restuser: [...]
  restuserkey: [...]
</code></pre>

<p><code>pv.yml</code>:</p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: vault-file-backend-volumeclaim
spec:
  storageClassName: heketi
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>
