When you create a persistent Volume you have to make sure that the corresponding storage class exist.
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.
For example in the guide you linked at the bottom of the yaml file you find:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: fast
provisioner: k8s.io/minikube-hostpath
parameters:
type: pd-ssd
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.
Therefore you should double check if you declared the storage class:
$ kubectl get storageclasses --all-namespaces
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.
Example
For example running on Google Kubernetes Engine I have by default a standard
class. Trying to deploy a claim I have as well a pending error message.
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":
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