<p>I installed kubernetes on two Centos7 VMs using kubeadm.</p>

<p>I am trying to follow the <a href="https://kubernetes.io/docs/tutorials/stateful-application/cassandra/" rel="nofollow noreferrer">Example: Deploying Cassandra with Stateful Sets</a> or <a href="https://github.com/IBM/Scalable-Cassandra-deployment-on-Kubernetes" rel="nofollow noreferrer">Scalable-Cassandra-deployment-on-kubernetes</a> samples.</p>

<p>Creating the local volumes works but <code>kubectl get pvc</code> always results in a status of <strong>Pending</strong>. <code>kubectl descrive pvc &lt;*pvc name*&gt;</code> results in the following warning:</p>

<pre><code>Events:
Type     Reason              Age                   From                         Message
----     ------              ----                  ----                         -------
Warning  ProvisioningFailed  54s (x16854 over 2d)  persistentvolume-controller  storageclass.storage.k8s.io "fast" not found
</code></pre>

<p>I'm uncertain how to create the "fast" storage class to enable the volume to be successfully created and complete the samples.</p>

<p>When you create a persistent Volume you have to make sure that the corresponding <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/" rel="noreferrer">storage class</a> exist.</p>

<blockquote>
  <p>A StorageClass provides a way for administrators to describe the “classes” of storage they offer. Different classes might map to quality-of-service levels, or to backup policies, or to arbitrary policies determined by the cluster administrators. Kubernetes itself is unopinionated about what classes represent. This concept is sometimes called “profiles” in other storage systems.</p>
</blockquote>

<p>For example in the guide you linked at the bottom of the yaml file you find:</p>

<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: fast
provisioner: k8s.io/minikube-hostpath
parameters:
  type: pd-ssd
</code></pre>

<p>This is the definition of the storage class, the api and the provisioner makes sure how it get mapped to the actual storage and depends on the Kubernetes implementation and where it is running.</p>

<p>Therefore you should double check if you declared the storage class:</p>

<pre><code>$ kubectl get storageclasses --all-namespaces
</code></pre>

<p>If you do not have a storage class you should create it specifying the correct provisioner or if it merely a test you can consider to create the volume claim of a storage class you already have.</p>

<h2>Example</h2>

<p>For example running on Google Kubernetes Engine I have by default a <code>standard</code> class. Trying to deploy a claim I have as well a pending error message.</p>

<p>Deploying the following yaml file(and note that the provisioned changed) I am able to successfully create the persistent volume claim since now Kubernetes knows what I mean with type "fast":</p>

<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: fast
provisioner: kubernetes.io/gce-pd  
parameters:
  type: pd-ssd
  zones: us-central1-a, us-central1-b
</code></pre>
