my pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: database-disk
labels:
stage: production
name: database
app: mysql
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
when i ran kubectl apply -f pvc.yaml
i got the following error Normal FailedBinding 12h (x83 over 13h) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
same pvc worked fine on "GKE" (Google Kubernetes Engine) but failing in my local cluster using microk8s
Did you create any PV in your cluster?
PV and Storage classes on local clusters should be done manually by cluster admin.
Check out Kubernetes documentation for the details:
A cluster administrator creates a PersistentVolume that is backed by physical storage. The administrator does not associate the volume with any Pod.
A cluster user creates a PersistentVolumeClaim, which gets automatically bound to a suitable PersistentVolume.
The user creates a Pod that uses the PersistentVolumeClaim as storage.