Score:1

Why K8S statefulsets volumeClaimTemplates status is pending , but the pod, pvc, pv are all fine?

ng flag

I use nfs-subdir-external-provisioner as automatic pv provisioner for my promethues (by promethues-operator ) I have created our sts,pod,pvc,pv successfully and everything looks fine. But if I use kubectl get sts -o yaml , the status is still "phase: Pending".... Anyone have idea about it ?

  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      creationTimestamp: null
      name: prometheus-k8s-db
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi
      storageClassName: managed-nfs-storage
      volumeMode: Filesystem
    status:
      phase: Pending
NAME             READY   AGE
prometheus-k8s   2/2     26m
NAME                                   READY   STATUS    RESTARTS   AGE
prometheus-k8s-0                       2/2     Running   0          28m
prometheus-k8s-1                       2/2     Running   0          28m

NAME                                 STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE
prometheus-k8s-db-prometheus-k8s-0   Bound    pvc-77c8035e-fe32-4c0d-8302-930b39979fc1   5Gi        RWO            managed-nfs-storage   3h57m
prometheus-k8s-db-prometheus-k8s-1   Bound    pvc-21989d64-cc89-4aed-bed5-30bd22c0ae35   5Gi        RWO            managed-nfs-storage   3h57m
Score:1
ly flag

Cause it's part of the spec field. It does not reflect any real status, just provides an information on how should a new pvc be created. This will not transition to any other state, ever.

ng flag
So it looks like a normal status? thanks for your answer :)
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.