admin管理员组

文章数量:1406937

I am trying to add vault in my cluster setup following the . The pod shows as pending:

 NAME      READY   STATUS    RESTARTS   AGE
vault-0   0/1     Pending   0          12m

Persistent Volume for data-vault-0 is stuck in Pending state. Here is the output from the events of the pod:

LAST SEEN              TYPE      REASON             OBJECT                                      MESSAGE
50m (x5 over 65m)      Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
49m (x2 over 65m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Pod vault-0 in StatefulSet vault successful
45m (x82 over 65m)     Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
44m (x2 over 49m)      Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
44m                    Normal    Killing            Pod/vault-agent-injector-66f45b5fd5-nmhtx   Stopping container sidecar-injector
29m                    Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
26m                    Normal    SuccessfulDelete   StatefulSet/vault                           delete Pod vault-0 in StatefulSet vault successful
23m (x24 over 29m)     Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
23m (x2 over 29m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Claim data-vault-0 Pod vault-0 in StatefulSet vault success
23m (x2 over 29m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Pod vault-0 in StatefulSet vault successful
2m48s (x82 over 23m)   Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
2m36s (x5 over 23m)    Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.

I am trying to add vault in my cluster setup following the https://developer.hashicorp/vault/tutorials/archive/kubernetes-cert-manager . The pod shows as pending:

 NAME      READY   STATUS    RESTARTS   AGE
vault-0   0/1     Pending   0          12m

Persistent Volume for data-vault-0 is stuck in Pending state. Here is the output from the events of the pod:

LAST SEEN              TYPE      REASON             OBJECT                                      MESSAGE
50m (x5 over 65m)      Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
49m (x2 over 65m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Pod vault-0 in StatefulSet vault successful
45m (x82 over 65m)     Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
44m (x2 over 49m)      Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
44m                    Normal    Killing            Pod/vault-agent-injector-66f45b5fd5-nmhtx   Stopping container sidecar-injector
29m                    Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
26m                    Normal    SuccessfulDelete   StatefulSet/vault                           delete Pod vault-0 in StatefulSet vault successful
23m (x24 over 29m)     Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
23m (x2 over 29m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Claim data-vault-0 Pod vault-0 in StatefulSet vault success
23m (x2 over 29m)      Normal    SuccessfulCreate   StatefulSet/vault                           create Pod vault-0 in StatefulSet vault successful
2m48s (x82 over 23m)   Normal    FailedBinding      PersistentVolumeClaim/data-vault-0          no persistent volumes available for this claim and no storage class is set
2m36s (x5 over 23m)    Warning   FailedScheduling   Pod/vault-0                                 0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
Share Improve this question asked Mar 6 at 17:12 DelyanDelyan 851 gold badge1 silver badge7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Following the given documentation Vault has been deployed with the help of StatefulSet. StatefulSets use Persistent Volumes to persist the data. The error message states that there are no Persistent Volumes or no Persistent Volumes which fullfill the Persistent Volume Claim. (e.g. due to mismatches in Access modes, storage capacity or reclaim policy).

"0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling."

If you followed the instructions you are using Minikube or which Kubernetes distro? If you use Minikube the addons default-storageclass and storage-provisioner should have been activated by default. So your Persistent Volumes will be created automatically by a StorageClass.

In case these addons are not enabled:

minikube addons enable storage-provisioner
minikube addons enable default-storageclass

Could please specify the Kubernetes Distro you are using and if you have a StorageClass.

本文标签: Deploy vault in local k8s cluster for certificate managementStack Overflow