Score:0

Persistent volume claim getting stuck in Pending mode

cn flag

I have just configured openebs as the storageclass type on k0s but when I then attempt to create a persistent volume claim it gets stuck in Pending mode.

As a check to satisfy the WaitForFirstConsumer constraint I created a deployment but after some time the persistent volume claim still remains in Pending mode.

I am pretty sure storageclass is configured well now (unless otherwise !) because when I run k0s kubectl get storageclass I get :

openebs-device openebs.io/local Delete WaitForFirstConsumer false 11h
openebs-hostpath openebs.io/local Delete WaitForFirstConsumer false 11h

For context my local-pvc.yaml is as below:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mssql-claim
spec:
  storageClassName: openebs.io/local
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 200Mi

This one however gives an error after I add the storageClassName attribute (Is the attribute mandatory for provisioning of the pvc? If so whats the exact value? ).

The original deployment doesnt contain the attribute though and I had to add it after some digging around. Im not entirely sure about which value i should configure for storageClassName: value.

What am I missing ?

Andrew Skorkin avatar
tr flag
As I understand, you provided `spec.storageClassName: openebs.io/local` But, according to your output, it seems not a name, but `provisioner`. Can you try to change as `spec.storageClassName: openebs-device` or `spec.storageClassName: openebs-hostpath` if those are your StorageClass names?
cn flag
@AndrewSkorkin No change same error even after amending to openebs-device. After doing ks describe pod mssql-depl-86c86b5f44-ldj48 I saw that the error is something to do with the node : " Warning FailedScheduling 10m (x6 over 16m) default-scheduler 0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate. "
cn flag
I fixed this before with k0s kubectl taint nodes serverfxc02 node-role.kubernetes.io/master- and it worked but for now its not working
Andrew Skorkin avatar
tr flag
Can you list your node? `kubectl get node`
cn flag
yes I can list nodes
cn flag
NAME STATUS ROLES AGE VERSION serverfxc02 Ready control-plane 27h v1.23.1+k0s
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.