storageclass.storage.k8s.io "standard" not found
PascalSalesch opened this issue · comments
Using the following config
volumeClaimTemplates:
- metadata:
name: storage
annotations:
volume.beta.kubernetes.io/storage-class: standard
Pods will be stuck on pending:
$ kubectl describe pvc storage
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 119s (x26 over 8m1s) persistentvolume-controller storageclass.storage.k8s.io "standard" not found
Available storageclass is hcloud-volumes, which I could of course use.
$ kubectl get storageclasses
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
hcloud-volumes (default) csi.hetzner.cloud Delete WaitForFirstConsumer true 19m
But it was unexpected that standard is not available, since this is a basic storage class that doesn't provide any specific performance or availability guarantees. It is often used as a default storage class.
I think it is fair to assume that standard means hcloud-volumes when csi.hetzner.cloud
is the provisioner
Hey @PascalSalesch,
I dont think there is an agreed upon naming for Storage Classes that all csi-drivers are following. Our default StorageClass that will be installed in Kubernetes following the guide is called hcloud-volumes
. This storage class IS marked as default, so if you do not explicitly specify a storage class then it will be used.
To make this clearer to users I would suggest we add a small info text to the K8s - Getting Started guide, that states the name of the StorageClass and that its the default.
Leaving out the field is a solution for my problem. I was hoping I could use the same config for minikube and hcs. Thank you!
You can also create your own StorageClass with whatever name you prefer. Here is the hcloud-volumes
Storage Class with a changed name:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: standard
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.hetzner.cloud
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true